108153, 30888, 69529, 126082:

New HTML message body options for Mailnews
Provide a work around / fix for some of the security and usability problems that HTML mails currently impose, by not rendering everything the sender throws at the user.

This class removes every HTML tag/attribute that is not explicitly allowed from the source.
Adding new class to build
r=akk, sr=jst


git-svn-id: svn://10.0.0.236/trunk@119118 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mozilla.BenB%bucksch.org
2002-04-16 18:24:14 +00:00
parent 0881360414
commit 88a779e421
10 changed files with 51 additions and 0 deletions

View File

@@ -99,6 +99,7 @@
#include "nsIXBLService.h"
#include "nsLayoutAtoms.h"
#include "nsPlainTextSerializer.h"
#include "mozSanitizingSerializer.h"
#include "nsRange.h"
#include "nsXMLContentSerializer.h"
#include "nsRuleNode.h"
@@ -343,6 +344,7 @@ MAKE_CTOR(CreateHTMLCopyTextEncoder, nsIDocumentEncoder, NS_NewHTM
MAKE_CTOR(CreateXMLContentSerializer, nsIContentSerializer, NS_NewXMLContentSerializer)
MAKE_CTOR(CreateHTMLContentSerializer, nsIContentSerializer, NS_NewHTMLContentSerializer)
MAKE_CTOR(CreatePlainTextSerializer, nsIContentSerializer, NS_NewPlainTextSerializer)
MAKE_CTOR(CreateSanitizingHTMLSerializer, nsIContentSerializer, NS_NewSanitizingHTMLSerializer)
MAKE_CTOR(CreateXBLService, nsIXBLService, NS_NewXBLService)
MAKE_CTOR(CreateBindingManager, nsIBindingManager, NS_NewBindingManager)
MAKE_CTOR(CreateContentPolicy, nsIContentPolicy, NS_NewContentPolicy)
@@ -720,6 +722,11 @@ static const nsModuleComponentInfo gComponents[] = {
NS_PLAINTEXTSINK_CONTRACTID,
CreatePlainTextSerializer },
{ "HTML sanitizing content serializer",
MOZ_SANITIZINGHTMLSERIALIZER_CID,
MOZ_SANITIZINGHTMLSERIALIZER_CONTRACTID,
CreateSanitizingHTMLSerializer },
{ "XBL Service",
NS_XBLSERVICE_CID,
"@mozilla.org/xbl;1",