facebook-instant-articles-sdk-php
facebook-instant-articles-sdk-php copied to clipboard
CDATA XHTML handling
Currently, loadHTML (DOMDocument) does not do anything on parsing cdata and the script content can include CDATA tags. This causes an issue on Elements\GeoTag->isValid() and the code omit script in CDATA even we use the original transform function.
One of the workaround for developers is to write
<script type="text/javascript">
// <![CDATA[
script here
// ]]>
</script>
And this is a typical solution for browsers who cannot understand XHTML.
On the other hand, we can remove '' string from the original content. do you want to do this on SDK in this PR?
This is a side task from #161