XHTML special chars in title line

Found a bug? Tell us!!
Post Reply
moenk
Regular
Posts: 52
Joined: Sat Apr 29, 2006 11:21 pm
Contact:

XHTML special chars in title line

Post 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?
CMS mit S9Y: MCSE - LPIC - SQL - GIS
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post 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.
Judebert
---
Website | Wishlist | PayPal
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
moenk
Regular
Posts: 52
Joined: Sat Apr 29, 2006 11:21 pm
Contact:

Post 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?
CMS mit S9Y: MCSE - LPIC - SQL - GIS
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Use this:

Code: Select all

<title>{$head_title|@default:$blogTitle|@escape} {if $head_subtitle} • {$head_subtitle|@escape}{/if}</title>
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
moenk
Regular
Posts: 52
Joined: Sat Apr 29, 2006 11:21 pm
Contact:

Post by moenk »

CMS mit S9Y: MCSE - LPIC - SQL - GIS
Post Reply