[CSSOM] issues with cssText and selectorText

Hi there,

I just discovered that Opera is the only "major" browser
that does not return a useless result for selectorText and
cssText in some cases that are not edge cases any more...

If the selector of a rule contains a ident itself containing
a colon, the colon must be escaped in the selector. But its
serialization in selectorText and cssText is NOT escaped. The
same issue happens with many escaped characters.

So the result of cssText and selectorText is useless because
unparseable and invalid...

FWIW, I have written a small test here

   http://glazman.org/forCSSWG/selectorTextBug.html

I said it's not an edge case any more because a small site called
Facebook gives its partners embeddable stylesheets with such selectors.
I discovered them validating a stylesheet in a famous newspaper's
website.
It's also super important to have a bijection here for editing
environments. If cssText and selectorText are unreliable, then building
a conforming style editor is almost impossible.

I think we should clarify the situation here, saying that the result
of selectorText and cssText must be parseable and represent really
what they are the serialization of...

FWIW, both Safari and Mozilla fail on the test above. MSIE of course
is not even able of running the three lines of script...

</Daniel>

Received on Wednesday, 3 February 2010 15:58:52 UTC