nsIPref *prefs = GetPrefServiceManager(obj->options); if (prefs) prefs->CopyCharPref("mailnews.display.html_sanitizer.allowed_tags", &allowedTags);
nsIPrefBranch *prefBranch = GetPrefBranch(obj->options); if (prefBranch) prefBranch->GetCharPref("mailnews.display.html_sanitizer.allowed_tags", &allowedTags);
MimeInlineTextHTMLSanitized_parse_eof (MimeObject *obj, PRBool abort_p){#ifdef DEBUG_BenBprintf("parse_eof\n");#endif  if (obj->closed_p)    return 0;  int status = ((MimeObjectClass*)&MIME_SUPERCLASS)->parse_eof(obj, abort_p);  if (status < 0)     return status;  MimeInlineTextHTMLSanitized *textHTMLSan =                                       (MimeInlineTextHTMLSanitized *) obj;#ifdef DEBUG_BenBprintf(" cbp: %d\n", textHTMLSan->complete_buffer);printf(" closed_p: %s\n", obj->closed_p?"true":"false");#endif  if (!textHTMLSan || !textHTMLSan->complete_buffer)  {#ifdef DEBUG_BenBprintf("/parse_eof (early exit)\n");#endif    return 0;  }#ifdef DEBUG_BenBprintf(" E1\n");printf("buffer: -%s-\n", NS_LossyConvertUCS2toASCII(*textHTMLSan->complete_buffer).get());#endif  char* allowedTags = 0;  nsIPref *prefs = GetPrefServiceManager(obj->options);  if (prefs)    prefs->CopyCharPref("mailnews.display.html_sanitizer.allowed_tags",                        &allowedTags);#ifdef DEBUG_BenBprintf(" E2\n");#endif  nsString& cb = *(textHTMLSan->complete_buffer);#ifdef DEBUG_BenBprintf(" E3\n");#endif  nsString sanitized;#ifdef DEBUG_BenBprintf(" E4\n");#endif  HTMLSanitize(cb, sanitized, 0, NS_ConvertASCIItoUCS2(allowedTags));#ifdef DEBUG_BenBprintf(" E5\n");#endif  NS_ConvertUTF16toUTF8 resultCStr(sanitized);#ifdef DEBUG_BenBprintf(" E6\n");#endif  // TODO parse each line independently  /* That function doesn't work correctly, if the first META tag is no     charset spec. (It assumes that it's on its own line.)     Most likely not fatally wrong, however. */  status = ((MimeObjectClass*)&MIME_SUPERCLASS)->parse_line(                             resultCStr.BeginWriting(),                             resultCStr.Length(),                             obj);#ifdef DEBUG_BenBprintf(" E7\n");#endif#ifdef DEBUG_BenBprintf(" E8\n");#endif  cb.Truncate();#ifdef DEBUG_BenBprintf("/parse_eof\n");#endif  return status;}