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.
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.
how about we file a bug for #1 in the meantime?
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.
I can use the stuff i did on the mail reply perf branch for this.
*** Bug 55224 has been marked as a duplicate of this bug. ***
above patch fixes problem
note to self: 1) go through txn manager so we can undo 2) dont insert docfrag, insert list of nodes instead
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?
fix checked in on trunk
gratuitous verify : it's been checked in for awhile.