Closed Bug 371965 Opened 17 years ago Closed 17 years ago

HTML entities not rendered in :before and :after pseudo-element content

Categories

(Firefox :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: scott, Unassigned)

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1) Gecko/20061027 Firefox/2.0
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1) Gecko/20061027 Firefox/2.0

CSS defines the ":before" and ":after" pseudo-elements that allow you to prefix or append textual content to a DOM item. (See: http://www.w3.org/TR/REC-CSS2/selector.html#before-and-after) However if you use an HTML entity in the content declaration in your stylesheet, it is not rendered in the page.

Reproducible: Always

Steps to Reproduce:
1. Define a stylesheet class with a ":before" or ":after" pseudo-element.
2. Put an HTML entity (such as &) in the content property.
Actual Results:  
Entity is printed out literally on page ("&").

Expected Results:  
Entity is rendered on page ("&").
Bugzilla has kindly dealt with my examples a little too literally. What that should have been was:

Actual output: &
Expected output: &
This is correct behaviour. CSS isn't html/xml and doesn't use entities.
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.