5450 Posts in 1672 Topics by 1197 members
|Go to End|
20 April 2009 at 2:44pm
I'm looking for a way to allow escaped HTML tags in the page title. It's no problem to use $Title.XML in the template to escape the tags properly, but if I have a title like "<p> The Paragraph Tag" it confuses the site tree in the CMS. How can I escape HTML titles in the CMS site tree?
I can enter "<p> The Paragraph Tag" into the navigation label field and it works - but it's always nice to have escapes done automatically. And this could also be a possible error source if a client uses a page title with a '<' or '>' character.
20 April 2009 at 9:12pm Last edited: 20 April 2009 9:13pm
I think you could use onBeforeWrite() to escape the string using htmlentities() before writing, something like this:
$this->Title = htmlentities($this->Title);
Havn't tried it but something like that should work
|Go to Top|