I have run into an issue in which the title field of feed item nodes isn't correctly decoded if the title contains an encoded single quote. The problem is that calls to html_entity_decode will decode double quotes and other entities by default, but not single quotes. For example:

$a = 'A 'Living Breathing Document': Thoughts on the ADA';
echo html_entity_decode($a);

outputs : A 'Living Breathing Document': Thoughts on the ADA

However

$a = 'A 'Living Breathing Document': Thoughts on the ADA';
echo html_entity_decode($a, ENT_QUOTES);

outputs: A 'Living Breathing Document': Thoughts on the ADA

I have created a patch that applies this change for every call to html_entity_decode in which a title is being set, which has completely addressed the issue for my site.

Comments

grendzy’s picture

StatusFileSize
new2.08 KB
new2.07 KB

decode_entities() is preferred, in order to support UTF-8 entities (such as €).

twistor’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)