You’re viewing an archive of outdated material. Visit The Web Standards Project’s updated site to learn about our current mission.

Error Handling Bugs (2)

MacIE's parser is over lenient, a misfeature that leads stylesheet authors who rely on MacIE to highlight mistakes into a false sense of security.

Incorrectly Interpreting Escaped Braces

This is quite a serious error, that potentially makes future stylesheets including escaped content to fail in MacIE. This document contains the following stylesheet:

    DIV.part1     { color: red; }
    DIV.part2     { color: red; }
    DIV.part1     { content: \}; color: green; }
    DIV.part2     { color: green; }

The third and fourth rules above should overrule the first and second rules, causing the next two DIVs to have green text. However, MacIE is interpreting the escaped closing brace (\}) as the end of the third rule's declaration block, and is then confused by the color declaration that, to the parser, appears to run into the fourth rule. It therefore ignores the third rule's color declaration and the fourth rule altogether.

This text should be green.
This text should be green.

Incorrectly Interpreting Two Consecutive Slashes

This is another case of MacIE not following the CSS grammar. This document contains the following stylesheet:

     DIV.slashed   { color: green; }

     // THIS IS *NOT* A COMMENT!
     DIV.slashed   { color: red; }

Since "//" is invalid inside a CSS selector, the entire second rule should be skipped, leaving only the first. Therefore the following DIV should be green.

This text should be green.