[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: xml pull parser
- From: "Adam D. Moss" <adam@...>
- Date: Mon, 21 Mar 2005 12:22:40 +0000
PA wrote:
The correction is fairly obvious. :)
I added an additional string.gsub( aString, "&", "&" ) before
decoding the other entities. Is it what you had in mind?
Well... no. :)
I meant that this:
aString = string.gsub( aString, "<", "<" )
aString = string.gsub( aString, ">", ">" )
aString = string.gsub( aString, "&", "&" )
aString = string.gsub( aString, "'", "'" )
aString = string.gsub( aString, """, "\"" )
Should become this:
aString = string.gsub( aString, "<", "<" )
aString = string.gsub( aString, ">", ">" )
aString = string.gsub( aString, "'", "'" )
aString = string.gsub( aString, """, "\"" )
aString = string.gsub( aString, "&", "&" )
Actually I just noticed that you have a similar problem with
&#XXX; entities which can't be solved with merely re-ordering
the substitutions. But you can fold every &*; case into the
aFunction and be happy (likely somewhat faster too).
--Adam
--
Adam D. Moss - adam@gimp.org