I've noticed this too -- a few GM scripts of mine have broken after
upgrading to FF10/Ubuntu and GreaseMonkey 0.9.15.
Some preliminary investigation I've done suggests that this may be
related to strict XML parsing inside the cdata. For example, I use
var myVar = <str><![CDATA[
approach to include HTML template strings in my GM scripts -- strings
of 'proto-HTML' that I embed inside my GM scripts to create new HTML
elements on my "fixed" pages after passing the string through an HTML
templating framework. I've found that after my FF/GM update, my
scripts fail if my CDATA contain something like: "<input type='radio'
id='blah'>" but works fine if my CDATA contains "<input type='radio'
id='blah'/>" (ie include trailing end-tag slash). That seems to imply
that GM or the e4x engine is being extremely picky about the contents
of the CDATA containing strictly-correct XML.
In reality, this is very frustrating. The purists will say "oh, well
you should be writing valid XML!". That's cute... but how many of you
actually write XML to the strictest of standards? If FF can parse it,
let me use it. More importantly, though, when using strings as HTML
templates, you don't always follow strict XML because it's intended to
be proto-XML that gets read by your templating framework and turned
into valid HTML.
Furthermore, this implies that the "var myVar = <str><!
[CDATA[ ... ]]></str>.toString();" approach, described here:
http://wiki.greasespot.net/Multi_Line_Strings as a solution to the
multi-line strings problem, requires it's contents to be well-formed
XML, which makes its use as a general multi-line string solution
limited and prone to frustration.
On Jan 22, 2:15 pm, esquifit <esqui...@googlemail.com> wrote:
> I have quite a few scripts that make use of the following construction:
> (here comes normal css code)
> This seems to be broken after the lastest GM upgrade, maybe even
> before, but it was working for sure one month ago or so.
> Currently I see that the script does not executes and the error console shows:
> Error: can't wrap XML objects
> Source file: <script file path>
> Line: 409
> Any idea what this could be? Since my Firefox is highly customized I
> want to to be sure that others have also the problem before filing a
> Running latest GM on Firefox 8 + Win7.