View Issue Details

This bug affects 1 person(s).
 2
IDProjectCategoryView StatusLast Update
09842Bug reportsImport/Exportpublic2015-09-30 11:01
ReporterTHO Assigned Toc_schmitz  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version2.06+ 
Fixed in Version2.06+ 
Summary09842: Error in R export plugin - Quotation marks are not escaped
Description

When exporting the R Syntax file from the survey results, quotation marks in radio lists are not escaped:

LimeSurvey Field type: A

data[, 5] <- as.character(data[, 5])
attributes(data)$variable.labels[5] <- ""
data[, 5] <- factor(data[, 5], levels=c("A1","A2","A3"),labels=c("answer with "quotes"", "answer without quotes", "answer with 'single quotes'"))
names(data)[5] <- "Q1"

This leads to an error in R. Other question types are escaped properly, so this might be a smaller issue ...

Steps To Reproduce

1) Question with type "list (radio" and add an answer that contains quotation marks (")
2) Answer survey at least once
3) Export R-Syntax-File from results
4) Running that in R (with data file) leads to an "unexpected symbol" error in R because of the misplaced "

(sample lsa attached)

TagsNo tags attached.
Attached Files
Bug heat2
Complete LimeSurvey version number (& build)150825
I will donate to the project if issue is resolvedNo
BrowserFirefox
Database type & versionno access, probably mysql
Server OS (if known)Linux sh16-45 3.2.0-88-generic #126-Ubuntu SMP Mon Jul 6 21:33:03 UTC 2015 x86_64
Webserver software & version (if known)no access, probably apache
PHP VersionPHP Version 5.3.10-1ubuntu3.19

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2015-08-25 13:21

administrator   ~33008

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&amp;id=15801

c_schmitz

c_schmitz

2015-09-30 11:01

administrator   ~33236

Version 2.06+ Build 150930 released

Related Changesets

LimeSurvey: master e1c5e5bf

2015-08-25 10:25:41

c_schmitz

Details Diff
Fixed issue 09842: Error in R export plugin - Quotation marks in answer options are not escaped Affected Issues
09842
mod - application/core/plugins/ExportR/RSyntaxWriter.php Diff File

Issue History

Date Modified Username Field Change
2015-08-25 10:23 THO New Issue
2015-08-25 10:23 THO File Added: survey_archive_788468.lsa
2015-08-25 12:25 c_schmitz Assigned To => c_schmitz
2015-08-25 12:25 c_schmitz Status new => assigned
2015-08-25 12:26 c_schmitz Status assigned => resolved
2015-08-25 12:26 c_schmitz Fixed in Version => 2.06+
2015-08-25 12:26 c_schmitz Resolution open => fixed
2015-08-25 13:21 c_schmitz Changeset attached => LimeSurvey master e1c5e5bf
2015-08-25 13:21 c_schmitz Note Added: 33008
2015-09-30 11:01 c_schmitz Note Added: 33236
2015-09-30 11:01 c_schmitz Status resolved => closed