Location: PHPKode > projects > Open Power Template > docs/Opt/syntax.entities.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns="http://www.w3.org/1999/xhtml" lang="pl">
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<meta name="robots" content="all" />

	<title>Entities - Open Power Template</title>
	<link rel="stylesheet" type="text/css" href="design/generic.css" media="all"  />
	<link rel="stylesheet" type="text/css" href="design/print.css" media="print" />
	<!--[if lte IE 6]><link rel="stylesheet" href="design/ie.css" type="text/css" /><![endif]-->	
	<!--[if IE 7]><link rel="stylesheet" href="design/ie7.css" type="text/css" /><![endif]-->

<div id="wrap">
	<div id="header">
		<h1>Open Power Template 2.0</h1>
		<p class="generated">@ 02.09.2010</p>
		<p class="location"><a href="index.html"><strong>User manual</strong></a> &raquo; <a href="syntax.html">Template syntax</a> &raquo; <a href="syntax.entities.html">Entities</a></p>
	<div id="content"><dl class="location"><dt><a href="syntax.html">3. Template syntax</a><br/>3.4. Entities</dt><dd class="prev">3.3. XML Prolog and DTD<br/><a href="syntax.prolog.html">&laquo; Previous</a></dd><dd class="next">3.5. Expressions<br/><a href="syntax.expressions.html">Next &raquo;</a></dd></dl>	<h1>3.4. Entities</h1><p>Because OPT contains an XML parser, the entities used in the templates are parsed on the server-side. Only the five special XML characters are converted back to the entities before sending the document to the server: <code>amp</code>, <code>quot</code>, <code>lt</code>, <code>gt</code>, <code>apos</code>. This is usually a good thing. Especially, if you are using UTF-8, you do not have to worry about how the entities are handled, because the browser accepts both the entity strings and the direct character codes.</p>

<p>OPT supports the Unicode entities like <code>&amp;#184;</code> and <code>&amp;#0xB8</code>. The special HTML entities like <code>&amp;nbsp;</code> or <code>&amp;Acute;</code> are parsed only if the configuration option <code>htmlEntities</code> is set to <strong>true</strong>. If the parser encounters an unknown entity, it generates an exception. You can register your own entities in the parser. The default entities added by OPT are <code>&amp;lb;</code> for <code>{</code> and <code>&amp;rb;</code> for <code>}</code>.</p>

<p>If you need to display an entity in the output document, you may use the function <code>entity()</code>.</p>
<h4>See also:</h4><ul><li><a href="syntax.functions.entity.html">3.6.13. entity()</a></li></ul><dl class="location location-bottom"><dt>3.4. Entities<br/><a href="syntax.html">3. Template syntax</a></dt><dd class="prev"><a href="syntax.prolog.html">&laquo; Previous</a><br/>3.3. XML Prolog and DTD</dd><dd class="next"><a href="syntax.expressions.html">Next &raquo;</a><br/>3.5. Expressions</dd></dl>		</div>
	<div id="footer">
		<p>Copyright &copy; <a href="http://www.invenzzia.org/">Invenzzia Group 2008-2009</a></p>
		<p>Available under the terms of license: <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License 1.2</a></p>
		<p>Generated by <strong>TypeFriendly 0.1.4</strong> by <a href="http://www.invenzzia.org/">Invenzzia</a></p>

Return current item: Open Power Template