This seems to be the culprit.
$element['value'] = check_plain(htmlspecialchars_decode($element['value'], ENT_QUOTES));

At least the following are missed by htmlspecialchars_decode: ' – “ and ”

Since htmlspecialchars_decode seems to miss a lot of encoded characters and Drupal's check_plain function will double encode without remorse we are left with a problem.

Files: 

Comments

ice5nake’s picture

ice5nake’s picture

Changing

$element['value'] = check_plain(htmlspecialchars_decode($element['value'], ENT_QUOTES));

to

$element['value'] = check_plain(decode_entities($element['value']));

seems to have solved the problem

ice5nake’s picture

Status:Active» Needs review
StatusFileSize
new496 bytes
ice5nake’s picture

My patch to end the double encoding is only working on View Displays setup with style "RSS Feed - Fields" and not on ones with style "RSS Feed".

Is the "RSS Feed" style part of a different module?

richsky’s picture

Issue tags:+7.x, +Double encoding

I have the same problem with 7rc3, outpout ' or & But for all custom rss fields.

I had to overrride theme.inc / template_preprocess_views_view_views_rss and add
ln 710 $value = htmlspecialchars_decode($value, ENT_QUOTES); because of

ln 878 format_xml_elements() that use check plain() that use htmlspecialchars() that reencode the string.

  • maciej.zgadzaj committed 35cde8c on 7.x-2.x
    Issue #1791856 by ice5nake: Certain html entities get double encoded
    
maciej.zgadzaj’s picture

Version:6.x-2.0-rc3» 6.x-2.x-dev
Issue summary:View changes
Status:Needs review» Fixed

Fixed in 6.x-2.x (+ fix's fix) and 7.x-2.x.

Status:Fixed» Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.