[Expat-bugs] [ expat-Bugs-1873199 ] CharacterDataHandler ampersand problem

SourceForge.net noreply at sourceforge.net
Thu May 1 12:24:47 CEST 2008


Bugs item #1873199, was opened at 2008-01-16 12:37
Message generated for change (Comment added) made by nobody
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1873199&group_id=10127

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: Rejected
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Karl Waclawek (kwaclaw)
Summary: CharacterDataHandler ampersand problem

Initial Comment:
If you parse <tagname>A&amp;B</tagname>, the characterdatahandler is called 3 times, each with the nodename of tagname, first with A, then with &, then with B

dan at cappannari.com

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2008-05-01 03:24

Message:
Logged In: NO 

It's absolutely normal parser behaviour. Extraction from expat
documentation: "...A single block of contiguous text free of markup may
still result in a sequence of calls to this handler. In other words, if
you're searching for a pattern in the text, it may be split across calls to
this handler...". Please refer to the documentation in the future before
submitting any bug.

----------------------------------------------------------------------

Comment By: Sebastian Pipping (hartwork)
Date: 2008-01-18 16:56

Message:
Logged In: YES 
user_id=1022691
Originator: NO

Expat is decoding entities on the fly so &amp; is exptected to give "&" in
the char data handler. In case that was not clear already.

----------------------------------------------------------------------

Comment By: Karl Waclawek (kwaclaw)
Date: 2008-01-16 13:04

Message:
Logged In: YES 
user_id=290026
Originator: NO

This is legal behaviour. You can have multiple call-backs for a contiguous
text string.
This also (if I remember correctly) happens for line breaks.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1873199&group_id=10127


More information about the Expat-bugs mailing list