|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2017-07-05 06:35 UTC] qdinar at gmail dot com
[2017-07-05 06:48 UTC] qdinar at gmail dot com
[2017-07-05 07:31 UTC] requinix@php.net
-Status: Open
+Status: Not a bug
[2017-07-05 07:31 UTC] requinix@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 14:00:01 2025 UTC |
Description: ------------ DomDocument fails to parse a document if it includes JavaScript Strings with HTML Tags inside the strings. Test script: --------------- $doc = new DomDocument(); $doc->loadHTML('<html><body><script>var p = \'<p>123</p>\'</script></body></html>'); echo $doc->saveHTML(); Expected result: ---------------- <html><body><script>var p = \'<p>123</p>\'</script></body></html> Actual result: -------------- <html><body><script>var p = '<p>123'</script></body></html> (The closing </p> tag got removed inside a JavaScript string)