adding @jlank's fix for cdata