facebook-instant-articles-sdk-php icon indicating copy to clipboard operation
facebook-instant-articles-sdk-php copied to clipboard

CDATA XHTML handling

Open everton-rosario opened this issue 8 years ago • 0 comments

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

everton-rosario avatar Aug 23 '16 11:08 everton-rosario