Hey guys,
I am using DOMDocument to grab HTML and alter it then spit it back out. For HTML pages that have script tags with a nested "</" in it that is not a "</script>", the script tag will be ended prematurely. Are there ways to get around this when using DOMDocument?
I tried searching far and wide and nobody seems to have found a solution.
For example
will be outputted as:Code:<script>document.write('<p>hello</p>');</script>
thus ending prematurely due to the "</" in the "</p>" ending tagCode:<script>document.write('<p>hello</script>



Reply With Quote
Bookmarks