nsISupports
Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0)nsIParserUtils
interface.Implemented by: @mozilla.org/feed-unescapehtml;1
as a service:
var scriptableUnescapeHTML = Components.classes["@mozilla.org/feed-unescapehtml;1"] .getService(Components.interfaces.nsIScriptableUnescapeHTML);
nsIDOMDocumentFragment parseFragment(in AString fragment, in PRBool isXML, in nsIURI baseURI, in nsIDOMElement element); |
AString unescape(in AString src); |
Parses a string of HTML or XML source into a sanitized DocumentFragment
.
This is equivalent to calling nsIParserUtils::parseFragment(fragment, 0, isXML, baseURI,
element)
. You should call nsIParserUtils::parseFragment()
instead of calling this method.
nsIDOMDocumentFragment parseFragment( in AString fragment, in PRBool isXML, in nsIURI baseURI, in nsIDOMElement element );
fragment
isXML
true
if the fragment
is an XML string; otherwise set it to false
.baseURI
isXML
is false
.element
nsIDOMElement
to be used as the context node for the purposes of the fragment parsing algorithm.An nsIDOMDocumentFragment
of the element with the new text appended.
NS_ERROR_FAILURE
Convents HTML source into plain text.
This is equivalent to calling nsIParserUtils::convertToPlainText(src,
nsIDocumentEncoder::OutputSelectionOnly |
nsIDocumentEncoder::OutputAbsoluteLinks, 0)
. You should call nsIParserUtils::convertToPlainText()
instead of calling this method.
AString unescape( in AString src );
src
The result of the plain text conversion.
NS_ERROR_FAILURE