Basically single quotes are encoded by check_plain() and result in ' because check_plain specifically encodes with ENT_QUOTES set:

<?
function check_plain($text) {
return drupal_validate_utf8($text) ? htmlspecialchars($text, ENT_QUOTES) : '';
}
?>

However as part of nodereference_allowed_values(), the values returned by Views are decoded without ENT_QUOTES:

<?
// Views theming runs check_plain (htmlentities) on the values.
// We reverse that with html_entity_decode.
$options[$key] = html_entity_decode(strip_tags($value['rendered']));
?>

So single quotes still remain encoded. (And will show up as encoded values in select lists)

Patch included.

CommentFileSizeAuthor
cck-nodereference-quotes.patch661 bytesMoonshine
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

yched’s picture

Status: Needs review » Fixed

Committed to userref.module as well. Thanks.

yched’s picture

(strange, because the ENT_QUOTES param was present in D5 branch already - well...)

Anonymous’s picture

Status: Fixed » Closed (fixed)

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