Closed
Bug 19515
Opened 25 years ago
Closed 25 years ago
[DOGFOOD] Content of a tag lost
Categories
(Core :: DOM: Editor, defect, P3)
Core
DOM: Editor
Tracking
()
VERIFIED
FIXED
M12
People
(Reporter: BenB, Assigned: akkzilla)
References
Details
(Whiteboard: [PDT+] will verify in 11/30 build.)
I entered the following msg:
<html><head></head>
<body>
<div type="_moz">bla <a href="http://www.m.o/1">link</a> bla <a
href="http://www.m.o
/3">link1</a></div><div type="_moz">
<a href="http://www.m.o/3">link2</a> bla <a href="http://www.m.o/2">li<b>n</b>k<
/a> bla <a href="ozuio">link </a>bla<a href="uiozp"> link</a> bla </div></body>
</html>
But only the following was passed to ScanHTMLForURLs (the function I'm working
on):
<html><head></head>
<body>
<div type="_moz">bla <a href="http://www.m.o/1"></a> bla <a href="http://www.m.o
/3">link1</a></div><div type="_moz">
<a href="http://www.m.o/3">link2</a> bla <a href="http://www.m.o/2">li<b>n</b>k<
/a> bla <a href="ozuio">link </a>bla<a href="uiozp"> </a> bla </div></body>
</html>
The content of the first and last a tag, "link", was lost.
Reporter | ||
Comment 1•25 years ago
|
||
Some easier msg failing:
<html><head></head>
<body>
<div type="_moz">bla <a href="zzzztio"></a> bla <a href="zuizui"></a></div><div
type="_moz">
<a href="zuizui"></a> bla <a href="zit">lin</a>k bla <a href="tziuuz"></a>
bla</div></body>
</html>
![]() |
||
Updated•25 years ago
|
Assignee: beppe → akkana
![]() |
||
Comment 2•25 years ago
|
||
Akkana, Ithink this may have something to do with saving, can you please check
this one out - thanks
![]() |
||
Updated•25 years ago
|
Target Milestone: M12
Assignee | ||
Updated•25 years ago
|
Status: NEW → ASSIGNED
Summary: Content of a tag lost → [DOGFOOD] Content of a tag lost
Assignee | ||
Comment 3•25 years ago
|
||
Yes, looks like there's a problem with the html sink stream. Losing the content
of <a> tags on output seems pretty important -- I'd argue that this is a dogfood
bug for the editor. Getting rid of the <div type="_moz"> doesn't help.
Assignee | ||
Comment 4•25 years ago
|
||
Interestingly, whatever is going wrong with handling these links also seems to
confuse the plaintext sink -- "link" doesn't make it into plaintext output
either. The fact that they're both confused suggests that it's a XIF problem --
but the XIF output looks fine, so perhaps it's a problem with parsing the XIF
into content nodes.
Assignee | ||
Comment 5•25 years ago
|
||
Sure enough -- there's a content node in the XIF, but when the XIF is parsed,
AddLeaf() in the sink is never called with the text node corresponding to
"link". Adding Harish to the cc list -- Harish, can you take a look? This may
be related to some of the recent changes to nsXIFDTD.cpp.
Assignee | ||
Updated•25 years ago
|
Whiteboard: [PDT+] → [PDT+] Rick will help look at it
![]() |
||
Updated•25 years ago
|
Whiteboard: [PDT+] Rick will help look at it → [PDT+] [by 12/10] Rick will help look at it when he gets back
![]() |
||
Comment 7•25 years ago
|
||
during the PDT meeting on Monday, Akkana requested assistance from someone who
knows the parser code. Rickg offered to help and will assist Akkana this coming
week.
Akkana, I left Rick a note and a voicemail reminding him to contact you.
Assignee | ||
Comment 8•25 years ago
|
||
For anyone wondering how to reproduce this:
Take the first message Ben gives, and put it in a local file. Then run
apprunner -edit file:[pathToLocalFile]
Notice "link" inside the first link.
Now select "Output HTML" from the Debug menu. Notice that "link" inside the
first link is not there.
Rick discovered something fascinating, though: edit the local file and change
"link" to "rick" then do OutputHTML again, and now the text is there!
Assignee | ||
Updated•25 years ago
|
Assignee: akkana → rickg
Status: ASSIGNED → NEW
Assignee | ||
Comment 9•25 years ago
|
||
As long as Rick is looking at it, I'll assign it to him; Rick, pass it back if
you run out of time or if the ball gets volleyed back to my side of the net.
![]() |
||
Comment 10•25 years ago
|
||
I've found the problem, and sent the patch to akkana. She will test with a
larger set of pages.
Assignee | ||
Updated•25 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 11•25 years ago
|
||
Accepting -- will test the patch and check it in.
Assignee | ||
Updated•25 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 12•25 years ago
|
||
The fix works for all the cases I tested, and doesn't hurt any of the existing
automated test cases. Checked in.
Whiteboard: [PDT+] [by 12/10] Rick will help look at it when he gets back → [PDT+] will verify in 11/30 build.
![]() |
||
Comment 13•25 years ago
|
||
will verify in 11/30 build.
Reporter | ||
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
Reporter | ||
Comment 14•25 years ago
|
||
sujay,
I just case test it via akkana's reproduce proposal, because editor's dialog
boxes seem broken.
Does someone else see this:
bash$ cat /usr/src/mozilla/dist/bin/test.html
<html><head></head>
<body>
<div type="_moz">bla <a href="http://www.m.o/1">link</a> bla <a
href="http://www.m.o
/3">link1</a></div><div type="_moz">
<a href="http://www.m.o/3">link2</a> bla <a
href="http://www.m.o/2">li<b>n</b>k</a> bla <a href="ozuio">link </a>bla<a
href="uiozp"> link</a> bla </div></body>
</html>
but
bash$ ./mozilla-apprunner.sh -edit file:/usr/src/mozilla/dist/bin/test.h
[...]
Getting HTML [Debug|Output HTML]
<html><head></head>
<body>
<div type="_moz">bla <a href="http://www.m.o/1">link</a> bla <a
href="http://www.m.o/3">link1</a></div><div type="_moz">
<a href="http://www.m.o/3">link2</a> bla <a
href="http://www.m.o/2">li<b>n</b>k<
/a> bla </a><a href="ozuio">link </a>bla<a href="uiozp"> link</a> bla
</div></body>
</html>
(note the escaped "</a>")?
You need to log in
before you can comment on or make changes to this bug.
Description
•