Re: [PEPr] Comment on XML::XML_FastCreate

From: Date: Mon, 19 Apr 2004 13:19:26 +0000
Subject: Re: [PEPr] Comment on XML::XML_FastCreate
References: 1 2 3 4 5  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-28018@lists.php.net to get a copy of this message
Le lun 19/04/2004 à 15:03, Davey a écrit : > 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, IE crash if the document is HTML with this end slash If the developper set the option "html", all single tags will be <tag> (without the /) > 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?) yes i can add the "expand" option, it's not a problem. But if i expand, somes problems occurs with XML interpreter like : <br></br> make 2 news lines under somes browsers.. > > - Davey

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