Re: flexy patch for toJavascript (xhtml compliance)]
| From: | Demian Turner | Date: | Sun, 21 Dec 2003 01:54:54 +0000 |
| Subject: | Re: flexy patch for toJavascript (xhtml compliance)] | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-9760@lists.php.net to get a copy of this message | ||
hi alan
looks like a small error slipped through in the <flexy:toJavascript> stuff, the
attached patch fixes the problem, without it pages give js errors.
cheers
demian
Alan Knowles wrote:
> Thanks, In CVS now
>
> Regards
> Alan
>
>
> Demian Turner wrote:
>
>> hi alan
>>
>> we're trying to get xhtml compliance and there's a small issue with
>> Flexy's Compiler/Standard/Flexy.php file, pls see email and suggested
>> patch below.
>>
>> cheers
>>
>> demian
>>
>> -------- Original Message --------
>> Subject: [Seagull-general] flexy patch for toJavascript (xhtml
>> compliance)
>> Date: Wed, 17 Dec 2003 15:50:53 -0800
>> From: John Dell <jdell@unr.edu>
>> To: seagull-general@lists.sourceforge.net
>>
>> Hi,
>>
>> flexy generates non-XHTML compliant javascript when you use the
>> <flexy:toJavascript ... /> command.
>>
>> The problem is that 'language' is an unknown attribute in xhtml. The
>> proper
>> way to declare javascript is with the 'type' attribute. This fix
>> works for
>> me.
>>
>> Here is relevant spec link:
>> http://www.w3schools.com/tags/tag_script.asp
>>
>> Demian, if this looks ok, can you pass along to Alan?
>>
>> Regards,
>> John
>>
>> The affected file is:
>>
>> /pear/HTML/Template/Flexy/Compiler/Standard/Flexy.php
>>
>> The change is:
>>
>> function toJavascriptToString($element) {
>> $ret = $this->compiler->appendPhp( "require_once
>> 'HTML/Javascript/Convert.php';");
>> -- $ret .= $this->compiler->appendHTML("\n<script
>> language='javascript'>\n");
>> ++ $ret .= $this->compiler->appendHTML("\n<script
>> type='text/javascript'>\n");
>> $prefix = ''. $element->getAttribute('FLEXY:PREFIX');
>>
>>
>>
>>
>> -------------------------------------------------------
>> This SF.net email is sponsored by: IBM Linux Tutorials.
>> Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
>> Free Linux Tutorials. Learn everything from the bash shell to sys admin.
>> Click now! ,9B"
>> àÊ6Â<ÿhttp://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
>> _______________________________________________
>> Seagull-general mailing list
>> Seagull-general@lists.sourceforge.net
>>
>> https://lists.sourceforge.net/lists/listinfo/seagull-general
>>
>
>