http://gemal.dk/mozilla/launchy.html
My extension, Launchy, uses saveDocument to save a document and then showing it an editor of the users choice:
when I use saveDocument HTML entities like fx © gets converted into a real copyright char.
I thought that if I just used the ENCODE_FLAGS_RAW flag it would work. But it doesn't seems to work.
My code:
---------------------
const nsIWBP = Components.interfaces.nsIWebBrowserPersist;
var persist = Components.classes["@mozilla.org/embedding/browser/nsWebBrowserPersist;1"].createInstance(nsIWBP);
persist.persistFlags = nsIWBP.PERSIST_FLAGS_FROM_CACHE | nsIWBP.PERSIST_FLAGS_NO_CONVERSION | nsIWBP.PERSIST_FLAGS_REPLACE_EXISTING_FILES | nsIWBP.PERSIST_FLAGS_NO_BASE_TAG_MODIFICATIONS | nsIWBP.PERSIST_FLAGS_DONT_FIXUP_LINKS | nsIWBP.FLAGS_DONT_CHANGE_FILENAMES;
var encodingFlags = nsIWBP.ENCODE_FLAGS_RAW; persist.saveDocument(doc, f, null, null, encodingFlags, 0); ----------------------
-- Henrik Gemal Mozilla Evangelist
Mozilla Blog with news, devinfo, links, etc: http://gemal.dk
_______________________________________________ mozilla-embedding mailing list [EMAIL PROTECTED] http://mail.mozilla.org/listinfo/mozilla-embedding
