View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
05384Bug reportsConditionspublic2011-09-02 00:12
Reporterwrenchpilot Assigned Tolemeur  
PriorityhighSeveritypartial_block 
Status closedResolutionfixed 
Product Version1.91+ 
Fixed in Version1.91+ 
Summary05384: Un-escaped answer strings and the condition designer
Description

Un-escaped answers are preventing predefined answers from being loaded in the condition designer.

Steps To Reproduce
  1. Create an array question.
  2. Add at least one answer option that uses an apostrophe (single quote) in the answer.
  3. Example: Don't Know / Didn't Use
  4. Add another array questions after this one.
  5. Now when trying to add conditions to this second question. None of the predefined answers will load.
  6. Upon viewing the JavaScript error console, you'll see an error similar to:

Error: missing ; before statement
Source File: https://SERVERNAME/admin/admin.php?action=conditions&sid=34441&qid=4161&gid=166&subaction=editconditionsform
Line: 773, Column: 18
Source Code:
Answers[236]='Don't know / Didn't use';

Additional Information

For a temporary fix I did this:

In the file "admin/conditionshandling.php" on line 1085
Change:
$an=FlattenText($can[2]);

To:
$an=addslashes(FlattenText($can[2]));

There may be a better solution, but this seems to work.

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)10647
I will donate to the project if issue is resolvedNo
BrowserAll browsers effected.
Database type & versionMySQL 5.1
Server OS (if known)RHEL6.1
Webserver software & version (if known)Apache 2.2
PHP Version5.3.3

Relationships

duplicate of 05399 closedc_schmitz Cannot add conditions after certain point in the survey 

Users monitoring this issue

wrenchpilot

Activities

lemeur

lemeur

2011-08-26 19:03

developer   ~16169

Fixed in latest stable plus release

Issue History

Date Modified Username Field Change
2011-08-08 16:54 wrenchpilot New Issue
2011-08-08 16:54 wrenchpilot Status new => assigned
2011-08-08 16:54 wrenchpilot Assigned To => lemeur
2011-08-08 17:12 wrenchpilot Issue Monitored: wrenchpilot
2011-08-26 19:02 lemeur Relationship added duplicate of 05399
2011-08-26 19:03 lemeur Note Added: 16169
2011-08-26 19:03 lemeur Status assigned => resolved
2011-08-26 19:03 lemeur Fixed in Version => 1.91+
2011-08-26 19:03 lemeur Resolution open => fixed
2011-09-02 00:12 c_schmitz Status resolved => closed
2021-08-02 23:28 guest Bug heat 2 => 4