Closed Bug 218082 Opened 21 years ago Closed 21 years ago

Unicode with View Page-Source vs View Selected-Source

Categories

(Core Graveyard :: View Source, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED INVALID

People

(Reporter: sense, Assigned: doronr)

References

()

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.4) Gecko/20030624
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.4) Gecko/20030624

If selecting an unicoded "<a href="mailto:..." (<a href="&#109;&#97;&#105;&....)
the "Show SELECTED-source-code ('Auswahlquelltext ansehen' in german)" of the
context menu shows the plain 'mailto:' plus the mail-address while the "Page
source" shows correctly the unicode-encoded 'mailto'

Reproducible: Always

Steps to Reproduce:
Steps are described on http://www.blindgif.ch/tests/viewsource.html

Actual Results:  
view 'source-code of SELECTED text' shows the plain 'mailto'
view Page-source shows correctly the unicoded 'mailto'

Expected Results:  
view 'source-code of SELECTED text' should show the original unicoded 'malto:'
as it dows with 'view Page-source'
This bug is IMHO INVALID or WORKSFORME.

Beda: "View selection source" is getting data from actual DOM (what actually
browser *displays*), but "View source" is taking data from (cached) source. Each
function is providing different data by its concept.
Indeed.  "selected source" is "source that when parsed would lead to the same
rendering as what you selected".
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
Adam and Boris: Thanx for clearing up the differences. My humble questions then:
"Is that difference documented (probably yes)?" and more important from the
user-view: "Do users not expect that we'll really see the source-code if the
context menu says 'View Selection Source' ?" - somehow confusing, but OK for me
since you lightened up my brains :)
Since you can select things that were not present in the original source (eg
things added via document.write calls), there is no way that the "selection
source" can have anything to do with the "original source", and we do assume
that any user advanced enough to know about the existence of "source" knows this...
v=aha
Status: RESOLVED → VERIFIED
all right you convinced me, thanx again for yr infos
Reporter, this is also the reason why the 'View Selection Source' window uses
the title 'DOM Source', while the normal 'View Source' doesn't do that.
I made a similar observation but this time the "view selection source" converts
a plain href attribute 

<a href="/cgi-bin/test-env?request=print&lang=en&copy=2&notify=fred">

to 

<a href="/cgi-bin/test-env?request=print&amp;lang=en%C2%A9=2&amp;notify=fred">

You can check that on 

http://ppewww.ph.gla.ac.uk/~flavell/www/formgetbyurl.html

by yourself. Is that also because the Mozilla engine "corrected" the plain
ampersands to the corresponding character entity reference?
> Is that also because the Mozilla engine "corrected"

Yes.  I don't know why you put it in quotes, since the markup before this change
is rather invalid (for example, in XHTML it would stop parsing of the document
altogether).
Boris,
it's invalid markup because it's from a page that explains when and how to
encode an URL. That URL is an example how *not* to do it. And Mozilla can not
correct this URL, can it? Otherwise it would have to come up with: <a
href="/cgi-bin/test-env?request=print&amp;lang=en&amp;copy=2&amp;notify=fred"> :-)

Product: Browser → Seamonkey
Product: SeaMonkey → Core Graveyard
You need to log in before you can comment on or make changes to this bug.