When I wanna reference a node which have a quote inside it's name I haven't the correct name une the select field (white the quote) but the quote's translate into the html code '

Comments

Samael27’s picture

Can I have some help please ?

Samael27’s picture

Up :(

Samael27’s picture

Up :(

Samael27’s picture

Up :(

Samael27’s picture

Up :(

wuinfo - bill wu’s picture

Give an example please. Do not understand what exactly your problem is.

What is the widget type you are using? When you have this problem? etc.

Samael27’s picture

I'm using the widget of select type (a simple select box where I choose a node title).
For exemple if I have a node witch's called => a text's problem
the ' will be shown with it html code (I don't remember the code at the moment but it's the point).

wuinfo - bill wu’s picture

StatusFileSize
new694 bytes

Similar issue was discussed for Entity reference. http://drupal.org/node/1665818

Here is the fix.

Samael27’s picture

Thanks it works :)

Alex Andrascu’s picture

Status: Active » Needs review
Alex Andrascu’s picture

Version: 7.x-2.0 » 7.x-2.x-dev

Status: Needs review » Needs work

The last submitted patch, node_reference-quote-problem-1764014-8.patch, failed testing.

Alex Andrascu’s picture

Please re-roll against latest dev

bendev’s picture

Status: Needs work » Reviewed & tested by the community

thanks.

Alex Andrascu’s picture

Status: Reviewed & tested by the community » Needs work

The last patch failed to apply. Can you please re-roll against latest dev?
Thanks

wuinfo - bill wu’s picture

Status: Needs work » Fixed

Code in 7.x-2.x have done something and fixed this problem.

    $label = html_entity_decode($value['rendered'], ENT_QUOTES);
    if (empty($value['group']) || $flat) {
      $options[$key] = $label;
    }

There is no need to apply this patch.

Diff between 7.x-2.0 to 7.x-2.x

732,735d743
<     // The label, displayed in selects and checkboxes/radios, should have HTML
<     // entities unencoded. The widgets (core's options.module) take care of
<     // applying the relevant filters (strip_tags() or filter_xss()).
<     $label = html_entity_decode($value['rendered'], ENT_QUOTES);
737c745
<       $options[$key] = $label;
---
>       $options[$key] = $value['rendered'];
743c751
<       $options[$group][$key] = $label;
---
>       $options[$group][$key] = $value['rendered'];
Alex Andrascu’s picture

Oh cool then. Thanks for the feedback.

Status: Fixed » Closed (fixed)

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