[Nitro] Nitro creating invalid XML
bryan.a.soto at gmail.com
Wed Feb 1 20:50:36 EST 2006
On 2/1/06, James Britt <james_b at neurogami.com> wrote:
> Bryan Soto wrote:
> > Hi James,
> > You can see what Nitro does if you look at
> > nitro/lib/nitro/compiler/morphing.rb. Nitro calls
> > REXML::Document.parse_stream which converts the & to & and then
> > calls the text callback, which simply adds it to the buffer. Perhaps we
> > should be doing some entity escaping in the text callback?
> Yes. '<' and '&' in plain text, where the ampersand is not part of
> some entity reference.
Nitro apparently does handle this. In your .xhtml file, place "Thongs %amp;
boxers". It will be converted to "Thongs & boxers" before it's sent to
Hope that's acceptable.
P.S. For the interested, it's located in glue/lib/glue/template.rb. Search
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Nitro-general