Closed Bug 454655 Opened 17 years ago Closed 17 years ago

DOM Source Of Selection replaces '&' with '&'

Categories

(Core :: DOM: Serializers, defect)

x86
Linux
defect
Not set
minor

Tracking

()

RESOLVED WONTFIX

People

(Reporter: andreas.moog, Unassigned)

References

Details

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.2) Gecko/2008090211 Ubuntu/8.10 (intrepid) Firefox/3.0.1 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.2) Gecko/2008090211 Ubuntu/8.10 (intrepid) Firefox/3.0.1 When viewing a part of the source code of a web page, i.e. Source of Selection, every '&' character (wheter in an url or otherwise) is replaced with it's html entity code, '&amp;'. Reproducible: Always Steps to Reproduce: 1. See attached html-file. 2. Select the link 3. Right Click and choose source of selection Actual Results: <a href="http://example.com?param=1&amp;etc">Link text with &amp; char</a> Expected Results: <a href="http://example.com?param=1&etc">Link text with & char</a> This bug was reported on Launchpad: https://bugs.edge.launchpad.net/ubuntu/+source/firefox-3.0/+bug/255524
View Selection Source serializes the DOM; it is not required to show a precise substring of the original source. The DOM contains a '&' character, and the correct way to serialize that inside an href attribute is to convert it to "&amp;". It would be wasteful and difficult to "remember" that the original HTML was invalid and emit invalid HTML during serialization.
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Component: General → Serializers
Product: Firefox → Core
QA Contact: general → dom-to-text
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.