Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Support for e4x broken in GM 0.9.14?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
DLo  
View profile  
 More options Feb 7 2012, 2:53 pm
From: DLo <dlop...@gmail.com>
Date: Tue, 7 Feb 2012 11:53:09 -0800 (PST)
Local: Tues, Feb 7 2012 2:53 pm
Subject: Re: Support for e4x broken in GM 0.9.14?
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
the
var myVar = <str><![CDATA[
....
]]></str>.toString();
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:

> Hi,

> I have quite a few scripts that make use of the following construction:

> GM_addStyle(<><![CDATA[
>  (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
> bug.

> Running latest GM on Firefox 8 + Win7.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.