I have some newsfeeds from google on my site, and I have noticed that some of the feeds display strange characters from time to time. (only some of the items, not all)

This includes characters like:
' ...instead of single quotes '
" ...instead of double quotes "

See the attachment for an example.

Thanks
jacauc

CommentFileSizeAuthor
#6 decode_title_entities.patch1.93 KBedmund.kwok
aggreg.jpg7.01 KBjacauc

Comments

stevenpatz’s picture

Is this still happening in HEAD?

jacauc’s picture

Sorry...was out of the country for a while.

I'm back now, where can I get the HEAD file to check if it fixed now?

Thanks!

stevenpatz’s picture

jacauc’s picture

I downloaded the latest CVS version from http://drupaldemo.org/ today and installed it as a seperate installation.
It seems to still be displaying strange characters yes.

have a look at http://wikihowto.dieinter.net (the block on the right)

stevenpatz’s picture

Version: 4.7.0 » x.y.z
Priority: Minor » Normal
edmund.kwok’s picture

Title: Some feeds display strange charcters in the aggregator block » Some feeds display strange charcters in the aggregator block, source page, and sources summary page
Status: Active » Needs review
StatusFileSize
new1.93 KB

Seems that check_plain is reencoding charaters that have already been encoded, specifically the & sign. For eg:

' (single quote) = ' become '
" (double quote) = " becomes "

Thus, ' and &;quot; is shown respectively. Not sure if this is the best fix, but patch passes the item title to decode_entities before check_plain.

This happens not only in the block but also in the source page and the sources summary page, adding in to title.

jacauc’s picture

Thanks, I have applied the patch on http://wikihowto.dieinter.net
Seems to work, as I do not see the strange chars anymore. Will keep an eye on it.

Thanks again!
Cheers
jacauc

edmund.kwok’s picture

Status: Needs review » Closed (duplicate)

jacauc, I'm marking this duplicate in favor of http://drupal.org/node/61456 since that was reported first. A new patch using filter_xss as suggested in that page is available there.