call Init on the document encoder
git-svn-id: svn://10.0.0.236/trunk@34130 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include "nsIDOMNodeList.h"
|
||||
#include "nsIDOMNSRange.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMEventReceiver.h"
|
||||
#include "nsIDOMKeyListener.h"
|
||||
#include "nsIDOMMouseListener.h"
|
||||
@@ -533,6 +534,17 @@ NS_IMETHODIMP nsHTMLEditor::OutputHTMLToString(nsString& aOutputString)
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
nsCOMPtr<nsIDOMDocument> domdoc;
|
||||
rv = GetDocument(getter_AddRefs(domdoc));
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
nsCOMPtr<nsIDocument> doc = do_QueryInterface(domdoc);
|
||||
nsString mimetype ("text/html");
|
||||
|
||||
rv = encoder->Init(doc, mimetype);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
return encoder->EncodeToString(aOutputString);
|
||||
#else
|
||||
return nsTextEditor::OutputHTMLToString(aOutputString);
|
||||
|
||||
Reference in New Issue
Block a user