This shows you the differences between two versions of the page.
|
plaintext [2009/10/13 11:10] Kornel |
plaintext [2015/11/26 10:37] (current) 2001:8b0:1151:da70:ec87:8fcf:9c8e:eb99 old revision restored |
||
|---|---|---|---|
| Line 5: | Line 5: | ||
| For plaintext you don't need automatic escaping, strict syntax/structure checks (which are strengths of PHPTAL), but you need precise control of whitespace (which is hard to do in XML). | For plaintext you don't need automatic escaping, strict syntax/structure checks (which are strengths of PHPTAL), but you need precise control of whitespace (which is hard to do in XML). | ||
| - | For plaintext, you can use standard PHP or Smarty as a templating language. Their ignorance about structure and lack of escaping by default, which are troublesome for XML, are exactly what you need for plain text. | + | For plaintext, you can use standard PHP or Smarty-like as a templating language. Their ignorance of structure and lack of escaping by default, which are troublesome for XML, are exactly what you need for plain text. |
| ===== Using PHPTAL's variables outside PHPTAL templates ===== | ===== Using PHPTAL's variables outside PHPTAL templates ===== | ||
| Line 32: | Line 32: | ||
| $text = html_entity_decode(strip_tags($markup),ENT_QUOTES,'UTF-8')); // remove tags and entities | $text = html_entity_decode(strip_tags($markup),ENT_QUOTES,'UTF-8')); // remove tags and entities | ||
| </code> | </code> | ||
| + | |||