I think I just found a weirdness in the editingSession and the docshell. If I try to edit a document having a chrome://* URL, scripts and plugins are not correctly disabled. I needed that to store "blank" transitional and strict html and xhtml documents into my jars. Even if I call disableJSAndPlugins() on the editingSession, scripts and plugins are not disabled or disabled only until major changes of the edited document. Not sure it's a bug though, there could be a good reason for this behavior. Anyway, workarounds are easy to implement.