View Selection Source replaces non-breaking spaces

RESOLVED DUPLICATE of bug 165686

Status

Core Graveyard
View Source
RESOLVED DUPLICATE of bug 165686
16 years ago
8 years ago

People

(Reporter: InvisibleSmiley, Assigned: Doron Rosenberg (IBM))

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

16 years ago
Reproducible: Always
Steps to reproduce:
1. Go to some page with content that you know contains non-breaking spaces
( ) - or simply create one.
2. Select the area containing the nbsp. and right-click on it, selecting "View
Selection Source".
3. View Source Code of the page and scroll to the according area.

Actual Results:
View Selection Source replaces the nbsp.s by plain spaces, thus making this
source view kind of useless for web developers who need the actual source being
viewed. View Page Source is showing everything as-is, i.e. correctly.

Expected Results:
The according areas shown by both View Selection Source and View Page/Frame
Source should exactly match. Maybe the problem is not limited to nbsp.s - please
investigate that in the Mozilla sources, I'm not involved enough in the project
to do that.
(Assignee)

Comment 1

16 years ago
cc:roc
There is no way to have "selection source" match the original text, since
"selection source" shows HTML that would lead to the page's DOM (and the DOM may
well have been modified with scripts and the like).

But we _should_ be escaping non-breaking spaces with the corresponding entity...
(Reporter)

Comment 3

16 years ago
OK, agreed; I didn't know Selection Source uses generated source code. But don't
forget to also change back other entities: German Umlaute appear converted to
ISO-Latin1 or-whatever, for example, even if the corresponding entities were
used in the original source code. One question could be if that transformation
should also be done for non-HTML/XML files such as *.txt (which shows up in
<pre> in Selection Source)...

Comment 4

16 years ago
> But we _should_ be escaping non-breaking spaces with the corresponding
> entity...

The content that is displayed comes direcly from the DOM function |.innerHTML|,
so perhaps that function isn't reverting things properly.

> I didn't know Selection Source uses generated source code.

The name "View Selection Source" was a compromise between a more precise but
long name, and a less precise and common name.
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Reporter)

Comment 5

16 years ago
So, is it that hard to implement (re-)converting non-breaking spaces? Let's say
forget about other entities, why not implement the basic needs for now?

Comment 6

15 years ago

*** This bug has been marked as a duplicate of 165686 ***
Status: NEW → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → DUPLICATE
Product: Browser → Seamonkey

Updated

8 years ago
Component: View Source → View Source
Product: SeaMonkey → Core Graveyard
You need to log in before you can comment on or make changes to this bug.