I am using the Rendered view field (title) as the display text for a webform select list. The title is one of those fields and unfortunately it is displayed as plain text, resulting in some characters getting displayed as HTML codes. For example "Jon's Book Review" would be displayed as "Jon's Book Review", which is unacceptable.
This problem does not happen if I use just the Node title as the display text, but that is not an option because I need to include additional fields. It is also specific to the choice of Listbox; the default use of checkboxes means the titles get rendered properly.
Can anyone point me in the right direction? Thanks.
Comments
Comment #1
stuwat commentedAfter taking a look at the source code for the webform containing the problem, I see that the ampersand used in the HTML code for the apostrophe, is being rewritten as "
&". The HTML for the apostrophe symbol therefore doesn't work, because it becomes "'" when it should be "'".This issue may be of relevance here: http://drupal.org/node/813924.
Once again, the problem only occurs with the use of listbox and rendered view fields.
Comment #1.0
stuwat commentedNew information
Comment #2
awaller98 commentedI realize this is an old thread, but I ran into this issue as well. I can't guarantee this solution doesn't cause problems elsewhere (nor have I checked), but it does correct HTML special chars appearing in Rendered view field (title) as the display text for a webform select list.
I don't know the proper way to submit a patch, but here is what worked for me:
In viewselect.inc, just change:
TO
I'm a bit noobish, so if anyone has time to run it through the paces to make sure it doesn't screw anything up... please do, and let me know if there is a better way to do this.
Comment #3
awaller98 commented