XHTML valid pagetitle/longtitle
Update: use the htmlent modifier. More info about htmlent on PHx wiki
Old stuff below
Start by creating a new snippet called phx:htmlspecialchars. Make sure you have PHx installed.
Paste the following code:
<?php return htmlspecialchars($output); ?>
Use it with document variables like:
or in your Ditto/Wayfinder template like:
There might be a plugin solution to this problem. Post a comment if you know one.