entities in titles: sometimes they are expanded...

Found a bug? Tell us!!
Post Reply
dmg

entities in titles: sometimes they are expanded...

Post by dmg »

Entities in the title of a story (such as accented characters) are sometimes expanded, and sometimes are not. See this entry:

http://turingmachine.org/silvernegative ... e;moc.html

The first title of the entry reads correctly: Cuauhtémoc

but after the date the & has been replaced with &

dmg
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: entities in titles: sometimes they are expanded...

Post by garvinhicking »

If you use HTML entities in the title of your entry, they cannot be encoded correctly. You must use the proper "é" characters in ISO-8859-1 charset, and NOT the HTML entity when posting. Serendipity does all the replacements for you then.

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/
jdrodrigues
Regular
Posts: 36
Joined: Sun Feb 12, 2006 9:27 pm
Location: London
Contact:

Post by jdrodrigues »

Can anyone tell me where the encoding is done ? I need to disable it.

Cheers,
Joel
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

jdrodigues: At which place? There are several encodings for URLs, for entry titles, for entry bodies, for blog titles, for blog subtitles...

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/
jdrodrigues
Regular
Posts: 36
Joined: Sun Feb 12, 2006 9:27 pm
Location: London
Contact:

Post by jdrodrigues »

Hi Garvin, it's ok , I remembered that I'd already dealt with the issue and where - I made an extra variable:

$serendipity['head_title'] = htmlspecialchars($title[0]);
$serendipity['xhead_title'] = $title[0];

This is because I do use HTML entities in article titles.

:)
Joel Rodrigues, The Music Information Exchange
News For Musicians & The Music Industry
webdev@musicix.net / http://musicix.net
Post Reply