tags:

views:

19

answers:

1

I'm trying to convert about 200 lines of my jQuery code into MooTools to avoid including two libraries on an existing site. I'm having a problem with just one line:

new Element('span', {text: ' » '}).inject(elem);

Once I inject the span, the text becomes:

»"

How can I prevent MooTools from escaping the ampersand? Here's a jsFiddle demo: http://jsfiddle.net/nHhSY/

+1  A: 

I think you need to use

new Element('span', {html: ' » '}).inject(elem);
Yi Jiang