The $dom->saveHTML() function does a pretty good job of knowing what
tags are not closed - IE it does <br>, <meta>, <param>, etc. correctly.
Is there a way to add a tag without children to it's database?
Specifically I'm talking about the new <source> tag from HTML 5 that is
being used to embed ogg/mp4 audio and video files.
Put it in a dom document object and spit it out with saveHTML() and you
get <source src="foo.ogg" type="video/ogg"></source> which is harmless
but technically incorrect.
I know html tidy allows you to define new childless nodes and sending
the output through tidy will then fix it, but I can't seem to find a way
to to it with DOMDocument so that you don't need to send it through tidy
before sending to the client.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php