nbsp modifier


1Presentation

This Smarty modifier transforms a string so that certain spaces are replaced by non-breaking spaces.


2Usage

Here is an example:

<h1>{$title|escape|nbsp}</h1>

3Examples

{'Question ?'|nbsp} {* 'Question&nbsp;?' *}
{'Answer !'|nbsp} {* 'Answer&nbsp;!' *}
{'Item : value'|nbsp} {* 'Item&nbsp;: value' *}
{'aaa ; bbb'|nbsp} {* 'aaa&nbsp;; bbb' *}
{'aa - bb − cc + dd'|nbsp} {* 'aa&nbsp;- bb&nbsp;− cc&nbsp;+ dd' *}
{'dd × ee ÷ ff'|nbsp} {* 'dd&nbsp;× ee&nbsp;÷ ff' *}
{'3 € 10 %'|nbsp} {* '3&nbsp;€ 10&nbsp;%' *}
{'« aa bb » “ cc dd ”'|nbsp} {* '«&nbsp;aa bb&nbsp;» “&nbsp;cc dd&nbsp;”' *}