Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread

 

By: Jeremy McNevin
Problem with ampersands and XML::Node.new [ reply ]  
2009-10-05 18:59
I've noticed that if you initialize a new node like so that includes an unescaped ampersand, you get the following...

>> x = XML::Node.new("title","foo & bar")
Error: unterminated entity reference bar.
=> <title>foo </title>

Wasn't sure if this is a bug or not, but I've noticed that "<" and ">" are properly escaped if you do this same thing.

Is this expected behavior?