Revise the doc encoder and content sink APIs yet again to make it easier
to add new flags (pass a flag in the constructor, rather than specific booleans. This in order to fix: 11249: Add flag to write only the body in html output.
This commit is contained in:
@@ -818,7 +818,7 @@ PRBool nsParser::IsValidFragment(const nsString& aSourceBuffer,nsITagStack& aSta
|
||||
|
||||
nsString theOutput("");
|
||||
nsIHTMLContentSink* theSink=0;
|
||||
nsresult theResult=NS_New_HTML_ContentSinkStream(&theSink,&theOutput,PR_FALSE,PR_FALSE);
|
||||
nsresult theResult=NS_New_HTML_ContentSinkStream(&theSink,&theOutput,0);
|
||||
SetContentSink(theSink);
|
||||
theResult=Parse(theBuffer,(void*)&theBuffer,aContentType,PR_FALSE,PR_TRUE);
|
||||
theOutput.StripWhitespace();
|
||||
|
||||
Reference in New Issue
Block a user