Closed Bug 118876 Opened 24 years ago Closed 24 years ago

XML Parser error when printing a card that contains a < & or >

Categories

(SeaMonkey :: MailNews: Address Book & Contacts, defect)

All
Windows ME
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.8

People

(Reporter: nbaca, Assigned: sspitzer)

Details

(Whiteboard: nab-print)

Attachments

(1 file, 3 obsolete files)

Overview: Problems printing cards that include some special characters such as "<" and "&". Steps to reproduce: 1. Create a card with a special character. I entered the special charcter in the Last Name text box and also tried the email address (< or &). 2. File|Print Card Actual Results: Prints an XML Parser error Expected Results: Should print the card without xml error
Marking nsbeta1, xml parser errors should not appear for any character especially including "<" or "&".
Keywords: nsbeta1
Whiteboard: nab-print
taking, I'm working on the fix.
Assignee: racham → sspitzer
< & or > are the only characters that we need to escape. this is the biggest ab printing wart, trying to compound-W it now.
Status: NEW → ASSIGNED
Summary: XML Parser error when printing some special charcters (<,&) → XML Parser error when printing < & or >
Target Milestone: --- → mozilla0.9.8
Attached patch complete patch.Splinter Review
I'll seek a review from bienvenu and mscott. I'm a little concerned that this is over XPCOM-ification. most people just choose to re-write this code when they need it, since it isn't that much code. see rdf_EscapeAmpersandsAndAngleBrackets() in nsRDFXMLSerializer.cpp but addressbook printing isn't a performance issue, and going through XPCOM once per card to get the conv instance isn't that big of a deal.
Attachment #64104 - Attachment is obsolete: true
Summary: XML Parser error when printing < & or > → XML Parser error when printing a card that contains a < & or >
Comment on attachment 64105 [details] [diff] [review] complete patch. r=bienvenu, looks good - I was hoping to change ScanTxt to take 8 bit chars, but apparently ScanTxt is perfect the way it is and can't be changed at all, so this should be OK. I might end up adding 8 bit interfaces to scan txt and just duplicate the code.
Attachment #64105 - Flags: review+
Comment on attachment 64105 [details] [diff] [review] complete patch. sr=mscott
Attachment #64105 - Flags: superreview+
fixed.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Trunk build 2002-02-01-03: WinMe, ok. will check linux and mac next.
Trunk build 2002-03-01: Linux RH 7.1, Mac 9.1 Verified Fixed.
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: