soldair / node-jsontoxml

this renders a simple javascript object structure into xml/html. js objects are easier to modify than strings so no need to parse a whole dom to reliably add a few elements. while this could support async callbacks it doesn't. if people need it i will be happy to add support.
MIT License
101 stars 38 forks source link

Undefined/Null check before calling .replace() on a cdata wrapping #13

Closed jlank closed 11 years ago

jlank commented 11 years ago

If you don't check and someone passes in an undefined variable it throws an error. I added a simple check for this, if its undefined it returns an empty CDATA block.

soldair commented 11 years ago

landed in npm @ 0.0.7