note 81235 added to function.dom-domdocument-savehtml
| From: | mjaque at ilkebenson dot com | Date: | Tue, 19 Feb 2008 19:34:37 +0000 |
| Subject: | note 81235 added to function.dom-domdocument-savehtml | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-136282@lists.php.net to get a copy of this message | ||
DOMDocument->saveXML() doesn't generate a proper XHTML format either.
There is a problem with "script" empty elements. For example:
This will be the code generated by saveXML, with an empty script tag.
<html>
<head>
<script type="text/JavaScript" src="myScript.js"/>
</head>
<body>
<p>I will not appear</p>
<script type="text/JavaScript">
alert("Not working");
</script>
</body>
</html>
I don't know if this is valid XHTML (W3C Validator doesn't complain), but both FF 2.0 and
IE 6 will not render it properly. Both will use </script> as the closing tag for the first
script causing js errors and ignoring in between elements.
----
Server IP: 130.206.1.5
Probable Submitter: 87.217.61.238
----
Manual Page -- http://www.php.net/manual/en/function.dom-domdocument-savehtml.php
Edit -- https://master.php.net/note/edit/81235
Del: integrated -- https://master.php.net/note/delete/81235/integrated
Del: useless -- https://master.php.net/note/delete/81235/useless
Del: bad code -- https://master.php.net/note/delete/81235/bad+code
Del: spam -- https://master.php.net/note/delete/81235/spam
Del: non-english -- https://master.php.net/note/delete/81235/non-english
Del: in docs -- https://master.php.net/note/delete/81235/in+docs
Del: other reasons-- https://master.php.net/note/delete/81235
Reject -- https://master.php.net/note/reject/81235
Search -- https://master.php.net/manage/user-notes.php