Open Bug 599763 Opened 15 years ago Updated 3 years ago

HTML Special Characters Rendered Without Trailing Semicolon

Categories

(Firefox :: General, defect)

5 Branch
x86
Windows XP
defect

Tracking

()

UNCONFIRMED

People

(Reporter: robert, Unassigned)

Details

Attachments

(2 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10 ( .NET CLR 3.5.30729; .NET4.0C) Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10 ( .NET CLR 3.5.30729; .NET4.0C) This appears to be related to bug 171367 though it is occurring in the browser. I was viewing a page that had a clear text link to Google. One of the URL arguments was &sub=. When displayed, the page had a large break before and after the URL and the &sub= was replaced with a special characters. After doing some experimenting, I discovered that any URL argument that mimics a special HTML character such as &amp=, &lt=, &gt=, etc. will not be displayed correctly. Reproducible: Always Steps to Reproduce: 1. Create a web page with a visible URL that includes an argument using &sub=, &amp= and &lt=. 2. View the page in Firefox. &sub= causes the most disruption so far. 3. Actual Results: http://www.google.com/ie=UTF-8⊂=search for &sub= http://www.google.com/ie=UTF-8&=search for &amp= http://www.google.com/ie=UTF-8<=search for &lt= Expected Results: http://www.google.com/ie=UTF-8&sub=search http://www.google.com/ie=UTF-8&amp=search http://www.google.com/ie=UTF-8&lt=search
Version: unspecified → 3.6 Branch
Reporter -> Are you still experiencing this issue with the latest version of Firefox 5? Does the issue occur with the latest nightly? http://nightly.mozilla.org/ Can you attach a screenshot or test case that shows the issue?
The bug for &sub= appears solved. It now renders properly on the screen and in a URL. &amp= and &lt= still render as their respective unencoded characters but I would probably expect that behavior. The URL itself, when used in an HREF, is rendered correctly with those character strings.
Version: 3.6 Branch → 5 Branch
Robert -> Still seeing with Firefox 11? Can you attach a screenshot or test case that shows the issue?
A simple test HTML document to display the special entity bug. &sub works correctly.
A screen capture from FF 11 of the test.html document being rendered
Under FF 11, the &sub issue is still fixed but the cases noted above for &amp=, &lt= as well as a test of &gt= continue to fail. It appears the parser is not checking for a trailing semicolon and is assuming the string is a special entity. Ideally &amp= would display as written but &amp;= would display as an ampersand.
Attachment #606857 - Attachment mime type: text/plain → text/html
Severity: minor → S4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: