Closed
Bug 233386
Opened 21 years ago
Closed 21 years ago
<br /> replaced by <br> in "View selection source" output
Categories
(SeaMonkey :: General, defect)
Tracking
(Not tracked)
VERIFIED
INVALID
People
(Reporter: bernzilla+bugs, Unassigned)
References
()
Details
User-Agent:
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113
If you select text within a web page that contains properly escaped (according
to the XHTML 1.0 spec) break tags (e.g. <br />), they are displayed incorrectly
as unescaped break tags when you right-click and select View Selection Source.
See the URL I've provided for a simple test case.
Reproducible: Always
Steps to Reproduce:
1. Go to the URL I've provided
2. Select a majority of the text of the page
3. Right-click and choose "View Selection Source"
4. Notice <br /> tags have been converted to <br>
5. Notice in a regular "View Source" of the entire page, they appear correctly
Actual Results:
Properly escaped break tags were displayed as unescaped break tags.
Expected Results:
The properly escaped break tags should have appeared exactly as they are in the
HTML source.
This problem is also evident in one of the latest Firebird builds on Windows:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7a) Gecko/20040131
Firebird/0.8.0+
Comment 1•21 years ago
|
||
the page is sent as text/html, hence it is parsed as HTML, not as XHTML. view
selection source shows a serialized DOM, and does therefore not use the xml
syntax for empty tags.
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
Comment 2•21 years ago
|
||
> The properly escaped break tags should have appeared exactly as they are in the
> HTML source.
That never happens with view selection source, since the selection may well
contain things that are NOT in the original HTML source (and conversely it may
lack things that were in said source).
Status: RESOLVED → VERIFIED
Reporter | ||
Comment 3•21 years ago
|
||
Maybe I'm just confused, but shouldn't "View Selection Source" be consistent
with the code you see when you choose "Page Source" from the View menu, for the
most part?
I just don't get why you see the <br /> correctly when you choose "Page
Source," but see <br> in place of what the developer actually wrote (<br />)
when you "View Selection Source" instead.
As someone who strives to write standards compliant code, when I view the
selection source and see a <br> I worry that I need to update a blog entry,
news posting, etc. so I don't break my compliance. Seeing a <br> when I really
wrote a <br /> causes unnecessary concern.
You guys know the way this stuff works, so I trust you, just don't quite
understand the inconsistency.
Comment 4•21 years ago
|
||
> Maybe I'm just confused, but shouldn't "View Selection Source" be consistent
> with the code you see when you choose "Page Source" from the View menu, for
> the most part?
There is no way for it to be, since the rendered page is pretty loosely related
to the "page source" code... (and in fact often totally unrelated).
> I just don't get why you see the <br /> correctly when you choose "Page
> Source,"
Because that reads the HTML text from the cache and shows it. It's not looking
at the parsed results but at the original text (more or less).
> but see <br> in place of what the developer actually wrote (<br />)
> when you "View Selection Source" instead.
Because that says "oh, there's a <br> here; I should show that". It has no idea
whether that was originally "<br>", "<br/>" or "<br >". That information
does not make it into the object model; the parser creates the same data
structures in all three cases.
This is why the selection source window's title is "DOM Source" -- to make it
clear that it's just showing a view of the DOM...
*** Bug 239726 has been marked as a duplicate of this bug. ***
Updated•20 years ago
|
Product: Browser → Seamonkey
Updated•19 years ago
|
Summary: Escaped break tags displayed incorrectly in View Selection Source output → <br /> replaced by <br> in "View selection source" output
Comment 6•19 years ago
|
||
See also bug 251695, same bug for Firefox.
Comment 7•19 years ago
|
||
*** Bug 312975 has been marked as a duplicate of this bug. ***
Comment 8•19 years ago
|
||
*** Bug 323816 has been marked as a duplicate of this bug. ***
Comment 9•18 years ago
|
||
*** Bug 350003 has been marked as a duplicate of this bug. ***
Comment 10•18 years ago
|
||
*** Bug 363838 has been marked as a duplicate of this bug. ***
Comment 11•18 years ago
|
||
*** Bug 363922 has been marked as a duplicate of this bug. ***
You need to log in
before you can comment on or make changes to this bug.
Description
•