toggling from Normal to HTML source leave code in Normal window

VERIFIED FIXED in mozilla0.9.6



18 years ago
16 years ago


(Reporter: sujay, Assigned: mozeditor)



Firefox Tracking Flags

(Not tracked)


(Whiteboard: EDITORBASE; Will verify after 125270 is fixed, URL)


(2 attachments)



18 years ago
using 4/27 build of netscape

1) launch netscape
2) jump to URL above
3) right mouse click and Save As HTML4.html
4) launch composer
5) open HTML4.html
6) toggle from Normal to HTML Source
7) toggle back to Normal

see all the HTML code at the bottom. shouldn't be there...should have
the tags cause you're back in Normal mode.

Comment 2

18 years ago
There seem to be a couple of problems here.

1. The DTD we use in InsertNodeAtPoint() seems to think that a bunch of tags, 
for example <blink>, are not allowed as children of <body>.

2. When #1 happens, we end up trying to add the document fragment containing the 
stuff we are trying to paste, directly to the document! Several times, with the 
sample doc I might add. ;-) When it does this, we get ASSERTIONS galore.

So I just finished attatching a patch that fixes #2. Unfortunately it has the 
side effect of dropping a bunch of tags when switching back to normal, because 
the DTD thinks they aren't allowed.

Not sure what to do with #1.
Assignee: kin → jfrancis

Comment 3

18 years ago
 how about we file a bug for #1 in the meantime?

Comment 4

18 years ago
good catch kin.

To fix problem one we need a seperate html insertion path.  Something like
"LoadHTML", where it's part of the semantics that we will NOT do any validation
aboveand beyond what the parser does.  This shouldn't be hard - it's surely
easier than what we already have.  Then coming back from source view should use
that path instead of the InsertHTML path.
Target Milestone: --- → mozilla1.0

Comment 5

18 years ago
Target Milestone: mozilla1.0 → mozilla0.9.6

Comment 6

18 years ago
I can use the stuff i did on the mail reply perf branch for this.
Whiteboard: EDITORBASE; 2 days;

Comment 7

18 years ago
*** Bug 55224 has been marked as a duplicate of this bug. ***

Comment 8

18 years ago
Posted patch editor diffsSplinter Review

Comment 9

18 years ago
above patch fixes problem
Whiteboard: EDITORBASE; 2 days; → EDITORBASE; 2 days; FIXINNHAND; need r=, sr=

Comment 10

18 years ago
note to self: 
1) go through txn manager so we can undo
2) dont insert docfrag, insert list of nodes instead

Comment 11

18 years ago
I've fixed the part of this that is under editor's control, but there are still
issues.  The blink tag still disappears, though it's content gets through fine.
 The tag disappearsa because the parser drops it.  It also drops it, I think,
when you view the page in the web browser, but you don't notice it there because
if you view source it shows you the original source, not the source you would
get if the document were written back out.

If we want blink to get through we need to have a way to communicate that to the
parser.  Something like an optional argument to CreateContextualFragment that
instructs it to use a different dtd?

Comment 12

18 years ago
fix checked in on trunk
Last Resolved: 18 years ago
Resolution: --- → FIXED


17 years ago
Whiteboard: EDITORBASE; 2 days; FIXINNHAND; need r=, sr= → EDITORBASE; Will verify after 125270 is fixed

Comment 13

16 years ago
gratuitous verify : it's been checked in for awhile.
You need to log in before you can comment on or make changes to this bug.