[ php-blog-Bugs-2931644 ] Display of HTML entities in title and headline

"SourceForge.net" <[email protected]> Wed, 13 Jan 2010 21:59:12 +0000
Newsgroups gmane.comp.serendipity.trackers
Message-ID <[email protected]>
Bugs item #2931644, was opened at 2010-01-13 22:59
Message generated for change (Tracker Item Submitted) made by nasentier
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=542822&aid=2931644&group_id=75065

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Layout
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Jan (nasentier)
Assigned to: Nobody/Anonymous (nobody)
Summary: Display of HTML entities in title and headline

Initial Comment:
Hi,

I'm using 1.5.1 and came across the following. (It's not really a bug, just an inconvenience.)  ;-)

I created an entry with a title containing some characters not in ISO-8859-1, what is what my blog runs in. These entered the database as html entities, and when I go to my blogs main page and look at the entry list I can see that these are being displayed as they should be.

But when I click on the entry, the headline and the html title tag are filled with &#xxxx; - the already escaped title from the database is sent through htmlspecialchars() and what comes out looks something like &amp;#xxxx;.

So I took a look at the code and replaced line 305 of the index.php with:
$serendipity['head_title']    = str_replace('&amp;#', '&#', htmlspecialchars($title[0]));

Seems to work but it's probably pretty ugly and can be done in a more elegant way... ;-) And there are probably some side effects I didn't think of because I'm not familiar with the code.

Cheers,

jb

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=542822&aid=2931644&group_id=75065

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.