Page 1 of 1

XHTML special chars in title line

Posted: Mon Jul 21, 2008 9:56 am
by moenk
On my website http://www.server-sql.de/ I have problems to get it validated with http://validator.w3.org/ - the "&" is not coded with htmlspecialchars(). Prohably in the next version the title and subtitle may be converted and entities used when necessary?

Posted: Mon Jul 21, 2008 6:02 pm
by judebert
I think we've examined this before, but I can't remember what we resolved.

I notice you're running 1.3; have you considered upgrading to 1.3.2? I can't guarantee it'll fix your problem, but it can't hurt, either.

Posted: Tue Jul 22, 2008 10:40 am
by garvinhicking
Hi!

Actually this is just a template matter. If you use the s9y default templates or bulletproof, all characters should be encoded...you can add the "@escape" modifier to your title attributes yourself in your custom template.

Regards,
Garvin

Posted: Wed Jul 23, 2008 11:15 am
by moenk
Thank you for your quick support! The title line now looks like this:

Code: Select all

<title>{$head_title|@default:$blogTitle} {if $head_subtitle} • {$head_subtitle}{/if}</title>
Where has the @escape-option to be applied?

Posted: Wed Jul 23, 2008 12:35 pm
by garvinhicking
Hi!

Use this:

Code: Select all

<title>{$head_title|@default:$blogTitle|@escape} {if $head_subtitle} • {$head_subtitle|@escape}{/if}</title>
Regards,
Garvin

Posted: Wed Jul 23, 2008 2:52 pm
by moenk