Comment #2 on issue 1922 by [email protected]: Caja does not strip downlevel-revealed conditional comments [possible fix included]
http://code.google.com/p/google-caja/issues/detail?id=1922

The stuff is _designed_ to be parsed as junk tags by non-IE parsers, and in the particular case of Caja they'll be discarded or rewritten by the whitelist.

I'm not sure I was clear, the *tags themselves* are not being discarded. The tags are parsed as plain text. That is what I was attempting to illustrate with my example. e.g. currently:

var example = caja.makeSaxParser({pcdata : function(x) { console.log(x) } });
example('<![if !vml]>foo<![endif]>');

yields the following console output:

&lt;!
[if !vml]
&gt;
foo
&lt;!
[endif]
&gt;

I would expect just:

foo

Is there a specific use case for Caja's parser you have in mind that would benefit? You say you're parsing HTML email, but are you doing something other than using the Caja sandbox for the results?

I am using the sax parser directly, and displaying it's output outside of the sandbox. I have html input (emails) with downlevel-revealed comments, which I wish to handle as above.

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--

--- You received this message because you are subscribed to the Google Groups "Google Caja Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to