Not sure if this is a -users or -dev issue but after typing this out I
believe it to be a -dev problem.

Summary:
Basically I'm having issues with "Knowing Your Own Metadata" <
https://github.com/Martii/greasemonkey/wiki/greasemonkey-manual-metadata-block
> . More specifically, it appears an attempt is made unescape html
entities within a <![CDATA[ ] ]> block within a Greasemonkey script w/
FF4b9. This does not happen when running the same code within the
available command lines.


Simplified test case:
alert( <headerBlock> <![CDATA[ foo&amp;b&lt;&gt;ar
]]></headerBlock>.toString() );
alert( <headerBlock> <![CDATA[ foo&b<>ar ]]></headerBlock>.toString() );


Expected / Actual Outcomes:
When done from the 'Web Console' / 'Error Console' command lines where
the text within the [ ] will appear in the alert() exactly as it is
entered. Similarly, this is not an issue in FF3.6 Greasemonkey scripts
/ Firebug command line / Error console command line, nor the earlier
FF4.0 betas (I think - at least, I don't recall coming up against this
before).

The problem when used within a Greasemonkey script however, the alert
displays "foo&b<>ar" (the first contents of CDATA after unencoding the
HTML entities) and then throws an error "unexpected end of HTML
entity" on the second line (if the ampersand is not the first "bad"
character, the error message differs).

-- 
You received this message because you are subscribed to the Google Groups 
"greasemonkey-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/greasemonkey-users?hl=en.

Reply via email to