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.
Comment | File | Size | Author |
---|---|---|---|
cck-nodereference-quotes.patch | 661 bytes | Moonshine |
Comments
Comment #1
yched CreditAttribution: yched commentedCommitted to userref.module as well. Thanks.
Comment #2
yched CreditAttribution: yched commented(strange, because the ENT_QUOTES param was present in D5 branch already - well...)
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.