changed way of checking for CDATA block