[DOGFOOD] Content of a tag lost

VERIFIED FIXED in M12

Status

()

Core
Editor
P3
normal
VERIFIED FIXED
18 years ago
16 years ago

People

(Reporter: BenB, Assigned: Akkana Peck)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [PDT+] will verify in 11/30 build.)

(Reporter)

Description

18 years ago
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

18 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

18 years ago
Assignee: beppe → akkana

Comment 2

18 years ago
Akkana, Ithink this may have something to do with saving, can you please check
this one out - thanks

Updated

18 years ago
Target Milestone: M12
(Assignee)

Updated

18 years ago
Status: NEW → ASSIGNED
Summary: Content of a tag lost → [DOGFOOD] Content of a tag lost
(Assignee)

Comment 3

18 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

18 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

18 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.

Updated

18 years ago
Whiteboard: [PDT+]

Comment 6

18 years ago
Putting on the PDT+ radar.
(Assignee)

Updated

18 years ago
Whiteboard: [PDT+] → [PDT+] Rick will help look at it

Updated

18 years ago
Whiteboard: [PDT+] Rick will help look at it → [PDT+] [by 12/10] Rick will help look at it when he gets back

Updated

18 years ago
Blocks: 12658

Comment 7

18 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

18 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

18 years ago
Assignee: akkana → rickg
Status: ASSIGNED → NEW
(Assignee)

Comment 9

18 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.

Updated

18 years ago
Assignee: rickg → akkana

Comment 10

18 years ago
I've found the problem, and sent the patch to akkana. She will test with a
larger set of pages.
(Assignee)

Updated

18 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 11

18 years ago
Accepting -- will test the patch and check it in.
(Assignee)

Updated

18 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED
(Assignee)

Comment 12

18 years ago
The fix works for all the cases I tested, and doesn't hurt any of the existing
automated test cases.  Checked in.

Updated

18 years ago
Whiteboard: [PDT+] [by 12/10] Rick will help look at it when he gets back → [PDT+] will verify in 11/30 build.

Comment 13

18 years ago
will verify in 11/30 build.
(Reporter)

Updated

18 years ago
Status: RESOLVED → VERIFIED
(Reporter)

Comment 14

18 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&lt;
/a&gt; bla </a><a href="ozuio">link </a>bla<a href="uiozp"> link</a> bla
</div></body>
</html>

(note the escaped "</a>")?

Updated

18 years ago
Blocks: 20870

Updated

18 years ago
No longer blocks: 20870
You need to log in before you can comment on or make changes to this bug.