When creating a view of a survey and using views rewrite, character such as ' or & or - are displayed as html code instead. So the word can't is displayed as can& # 0 3 9 ;t (minus the spaces) for example.
I have done a lot of searching on this but can't seem to find a solution.
Any help or ideas would be greatly appreciated.

Comments

avostar created an issue. See original summary.

avo webworks’s picture

Issue summary: View changes
avo webworks’s picture

I've done some more searching on this issue. There is a lot of discussion on this issue both in views and in token module but none of the suggestions there work. https://www.drupal.org/node/1713164 or just doing a Google search "drupal views apostrophe". None of the suggestions work.
I also created a views-view-fields-page.tpl.php and have the same problem with theapostrophe being displayed as html.
In my template file I also tried: print str_replace("'", "'", $fields['ls_XXXX-XX']->content); with no success.

Any help would be greatly appreciated.

avo webworks’s picture

FIXED:
In the file limesurvey_sync_answer.class.inc (API Folder) I changed the check_plain function to the filter_xss function and reran the answer import. Now the apostrophe works and I see no more html.

avo webworks’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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

thedut credited thedut.

thedut’s picture

Status: Closed (fixed) » Fixed

Hello avostar,

Thank you for this fix !
I have just included it into the v7.x-3.x dev version.

Status: Fixed » Closed (fixed)

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