This is an old revision of the document!


Upgrading from older releases

1.1.x → 1.2.0

The biggest difference is in handling of entities. Entities are now unescaped before passing to expressions, i.e. ${php:strlen('"')} “sees” just the quote character and returns 1. In previous versions entities were passed as-is to the expressions (and that example would return 6).

Newly added unescaping of entities can expose encoding bugs. Make sure your pages declare document encoding: For XHTML it's best to send Content-Type:application/xhtml+xml;charset=UTF-8 or Content-Type:text/html;charset=UTF-8 HTTP headers.

In HTML add appropriate <meta> tag or send Content-Type:text/html;charset=UTF-8 HTTP header.

* Don't include any PHPTAL's files before including PHPTAL.php.