[PHPTAL] Lower than as char in javascript
Kornel Lesinski
kornel at aardvarkmedia.co.uk
Fri May 30 10:59:19 CEST 2008
On Thu, 29 May 2008 21:55:11 +0100, Christian Welzel <gawain at camlann.de>
wrote:
> is there a way to insert a lower than in phptal, which is printed as
> lower than in the source code?
In this case PHPTAL does what XHTML requires and escapes '<' as '<'.
This is perfectly OK and works in browsers in XML mode, but not when XHTML
gets misinterpreted as invalid HTML.
If you use XHTML as text/html, then you can avoid incompatibilities by
using CDATA like this:
<script type="text/javascript">/*<![CDATA[*/
if (2 < 3) {}
/*]]>*/</script>
--
regards, Kornel
More information about the PHPTAL
mailing list