Hi again,
I got an answer from Mozilla and it turns out the firefox behavior is
the only correct one (a browser is supposed to disable the scripts
parsed from DOMParser.parserString, which is the function I use). So
mozilla has filed a bug report to webkit, and I have filed one for
Opera. (see:
https://bugzilla.mozilla.org/show_bug.cgi?id=752231).
With regards to lib-gwt-svg, what I plan to do in the next release
(0.5.7), is to add the following method overload to OMSVGParser.
/**
* Calls OMSVGSVGElement(String, boolean) with parseScripts set to true
*/
public static final OMSVGSVGElement parse(String rawSvg)
/**
* Parses the supplied SVG text into a document
* @param rawSvg
* raw xml to be parsed
* @param parseScripts
* activate the scripts embedded in the svg if set, deactivates them otherwise.
* @return
* the document resulting from the parse
* @throws ParserException
* if the document is not well-formed or is not SVG
*/
public static final OMSVGSVGElement parse(String rawSvg, boolean parseScripts)
This way your code will keep on working when Opera and Webkit fix
their bugs, and it will still be possible to have the official
'script-less' behavior by valuating the parseScripts flags to false.
Regards
Lukas