Closed Bug 246505 Opened 21 years ago Closed 19 years ago

simple html displays the ; from entities

Categories

(SeaMonkey :: MailNews: Message Display, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.8alpha2

People

(Reporter: mvl, Assigned: BenB)

Details

(Keywords: regression)

Attachments

(1 file)

A mail message displayed as simple html will show the ; of entities. For example   displays as ;, and & displays as &; Seeing this with linux gtk2 2004061218 (self made cvs build). Didn't see this with my previous build, 2004060321. steps to reproduce: 1. send yourself a html+plaintext mail, with at least an & in it. 2. view the message as simple html 3. notice the extra ; 4. check in plain text and originial html that the ; shouldn't be there
I looked through likely bugs, and found bug 243040 "HTML sanitizer misinterprets attribute values". By backing out attachment 150102 [details] [diff] [review] this problem went away.
cc-ing ben bucksch, who wrote that patch
That's probably because I added a ";" after outputting entities. I thought that was necessary (&entityname;)? Maybe Gecko already gives us the ";" in the entity name? Or that's because of the escaping, but I don't think so. Will have to test.
Assignee: sspitzer → ben.bucksch
Priority: -- → P2
Priority: P2 → --
Attached patch Fix, v1Splinter Review
> Maybe Gecko already gives us the ";" in the entity name? Indeed, it gives e.g. "nspr;" as entity name. Freaky.
Comment on attachment 150923 [details] [diff] [review] Fix, v1 trivial patch, akk and jst, please review
Attachment #150923 - Flags: superreview?(jst)
Attachment #150923 - Flags: review?(akkzilla)
trivial patch, akk and jst, please review
Keywords: regression
Target Milestone: --- → mozilla1.8alpha2
Comment on attachment 150923 [details] [diff] [review] Fix, v1 Hmm, odd. One could maybe check if the terminating ';' is there and add it if it isn't, but one could also hope that we're consistent (I'm assuming you checked)... sr=jst
Attachment #150923 - Flags: superreview?(jst) → superreview+
Comment on attachment 150923 [details] [diff] [review] Fix, v1 r=akkana -- obviously needed to fix the regression. I wonder if it would be better in the long run to use nsIParserService's HTMLConvertEntityToUnicode method instead, like the plaintext serializer does? Anyone know what the implications are of using one vs. the other? The html and xml serializers don't seem to do anything for this case -- in fact, they no longer seem to support serializing from parser tags at all -- no matches for eHTMLTag_ at all. Weird.
Attachment #150923 - Flags: review?(akkzilla) → review+
The patch has reviews, can it get checked in or is a rewrite per comment 8 necessary?
yes, once I get to it. low pri.
OS: Linux → All
Comment on attachment 150923 [details] [diff] [review] Fix, v1 I'd like to get this in. Getting tired of reading html mail with umlaut entities..
Attachment #150923 - Flags: approval1.8a2?
Comment on attachment 150923 [details] [diff] [review] Fix, v1 I checked this patch in. Can this be marked fixed or will there be more changes?
Attachment #150923 - Flags: approval1.8a2?
Product: Browser → Seamonkey
Marking Fixed. Thanks, Ere.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: