Closed Bug 275556 Opened 20 years ago Closed 20 years ago

View selected source renders character entities instead of showing the entity codes in HTML

Categories

(Toolkit :: View Source, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 236465

People

(Reporter: d.drury, Assigned: bugs)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 View selected source should show entity codes rather than the characters represented by those codes. Reproducible: Always Steps to Reproduce: 1.Highlight text on web page with character entities in 2. Right click and select View selected source Actual Results: Character entities such as " were rendered as " (double quotes) Expected Results: Character entities should be displayed as they are in code.
View selection source shows the DOM source as generated by the HTML parser, that's what it does and the only way it could work (otherwise, when you select something generated by Javascript, it would have to show you <script src="foo.js">, or maybe parts of three different functions in two different external files). The DOM stores them as characters, not entity references, so that's how it shows them. So, your choice on resolution: INVALID, or duplicate of bug 236465 (give it a name that makes it more obvious what it does)?
Guess it would have to be the duplicate - right now it doesn't do what it says it does, hence the appearance of a bug. Mind you, isn't the Javascript thing close to an edge case? I guess it depends what the function was designed for. The name kind of suggests it was designed for viewing source. There used to be an Internet Explorer powertoy plugin that did this. Very very useful for developing. Also triggers the idea for an enhancement where it is possible to view source with the selected text highlighted in the source. Would be great for debugging.
I'd love having a third "view approximately where that came from in the source" command, but doing it would be tough (parse the source again, stopping when you create your target node?) and would wind up generating even more "view approx... source doesn't find the right spot" bugs. Marvelous idea for an extension or an external app embedding Gecko, though. *** This bug has been marked as a duplicate of 236465 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
Status: RESOLVED → VERIFIED
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.