Re: [PEPr] Comment on XML::XML_FastCreate

From: Date: Mon, 19 Apr 2004 13:03:04 +0000
Subject: Re: [PEPr] Comment on XML::XML_FastCreate
References: 1 2 3 4  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-28016@lists.php.net to get a copy of this message
Guillaume Lecanu wrote:
Le lun 19/04/2004 à 13:17, Sérgio Carvalho a écrit :
Alan Knowles wrote:
the closing /> can sometimes break html - I cant remember the example of hand, but it does cause havoc sometimes..
I know of two cases: 1. <script /> causes IE to consider everything from there on as script code. 2. <textarea /> causes both IE and Mozilla to consider everything from then on as the textarea initial value.
So, this is not a big problem because for theses 2 cases, a value is give to the method : $x->script('the script') => <script>the script</script> and not : $x->script() => </script> But i will remove the slash of single tag in "html" mode ( <br /> to <br>) Thanks, Regards,
Sérgio Carvalho
The problem arises when you do: $x->script(array('src' => 'somescript.js')); That will output <script src="somescript.js" /> as it well should, however IE will die on this, so I would suggest that you *always* expand the <script> element to <script></script> - it makes no difference to XML Parsers and means if you send XHTML to IE it won't die. (Perhaps you could make it an option actually?) - Davey

« previous php.pear.dev (#28016) next »