[Nitro] Nitro creating invalid XML

Bryan Soto 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 &amp; 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.

Hi James,

Nitro apparently does handle this. In your .xhtml file, place "Thongs %amp;
boxers". It will be converted to "Thongs &amp; boxers" before it's sent to
the browser.

Hope that's acceptable.


P.S. For the interested, it's located in glue/lib/glue/template.rb. Search
for %nbsp.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20060201/509255a5/attachment.html 

More information about the Nitro-general mailing list