View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
06076Bug reportsOtherpublic2012-05-10 13:13
ReporterNickko Assigned Toc_schmitz  
PrioritynormalSeverityminor 
Status closedResolutionno change required 
Product Version1.92+ 
Summary06076: Simple quote block attribut importation
Description

Problem describe by a user on the French forum.

A user try to complete question with token table attribute with this code :
<script type="text/javascript" charset="latin1">
$(document).ready(function() {
$("#answer64694X91X21661_1").val('{TOKEN:ATTRIBUTE_5}');
$("#answer64694X91X21662_1").val('{TOKEN:ATTRIBUTE_6}');
$("#answer64694X91X21663_1").val('{TOKEN:ATTRIBUTE_7}');
$("#answer64694X91X21664_1").val('{TOKEN:ATTRIBUTE_8}');
$("#answer64694X91X21665_1").val('{TOKEN:ATTRIBUTE_9}');
$("#answer64694X91X21666_1").val('{TOKEN:ATTRIBUTE_10}');
$("#answer64694X91X21667_1").val('{TOKEN:ATTRIBUTE_11}');
$("#answer64694X91X21668_1").val('{TOKEN:ATTRIBUTE_12}');
$("#answer64694X91X21669_1").val('{TOKEN:ATTRIBUTE_13}');
$("#answer64694X91X216610_1").val('{TOKEN:ATTRIBUTE_14}');
$("#answer64694X91X216611_1").val('{TOKEN:ATTRIBUTE_15}');
});
</script>

When an attribute contain an simple quote like "rue de l'église" (church street in Fhench), javascript report an exception (see join screenshoot).

Simple quote is frequent in French.

TagsNo tags attached.
Attached Files
tmpsrv.png (7,692 bytes)   
tmpsrv.png (7,692 bytes)   
Bug heat6
Complete LimeSurvey version number (& build)120412
I will donate to the project if issue is resolvedNo
BrowserIE, Firefox, Chrome and Opera
Database type & versionMySQL (i don't know version)
Server OS (if known)I don't know
Webserver software & version (if known)PHP & Apache
PHP Version(i don't know version)

Users monitoring this issue

Nickko

Activities

Nickko

Nickko

2012-05-09 18:28

updater   ~18645

Problème résolu par Denis : http://www.limesurvey.org/fr/forum/french-forum/79928-probleme-de-mise-a-jour-de-donnees-issue-dune-base-dans-un-questionnaire#80066

use this code :
<script type="text/javascript" charset="latin1">
$(document).ready(function() {
$("#answer64694X91X21661_1").val("{TOKEN:ATTRIBUTE_5}");
$("#answer64694X91X21662_1").val("{TOKEN:ATTRIBUTE_6}");
$("#answer64694X91X21663_1").val("{TOKEN:ATTRIBUTE_7}");
$("#answer64694X91X21664_1").val("{TOKEN:ATTRIBUTE_8}");
$("#answer64694X91X21665_1").val("{TOKEN:ATTRIBUTE_9}");
$("#answer64694X91X21666_1").val("{TOKEN:ATTRIBUTE_10}");
$("#answer64694X91X21667_1").val("{TOKEN:ATTRIBUTE_11}");
$("#answer64694X91X21668_1").val("{TOKEN:ATTRIBUTE_12}");
$("#answer64694X91X21669_1").val("{TOKEN:ATTRIBUTE_13}");
$("#answer64694X91X216610_1").val("{TOKEN:ATTRIBUTE_14}");
$("#answer64694X91X216611_1").val("{TOKEN:ATTRIBUTE_15}");
});
</script>

Replace ' by " into Javascript code.

c_schmitz

c_schmitz

2012-05-10 12:27

administrator   ~18653

Hwere does the code come from? Is that custom Javascript code?

Nickko

Nickko

2012-05-10 13:07

updater   ~18655

It's a workaround supplied by Denis

c_schmitz

c_schmitz

2012-05-10 13:13

administrator   ~18656

I think general that's not a bug. You have to make sure to apply proper quoting to the value by using EM functions.

Issue History

Date Modified Username Field Change
2012-05-09 16:10 Nickko New Issue
2012-05-09 16:10 Nickko File Added: tmpsrv.png
2012-05-09 18:28 Nickko Note Added: 18645
2012-05-09 18:28 Nickko Issue Monitored: Nickko
2012-05-10 12:27 c_schmitz Note Added: 18653
2012-05-10 12:27 c_schmitz Assigned To => c_schmitz
2012-05-10 12:27 c_schmitz Status new => feedback
2012-05-10 13:07 Nickko Note Added: 18655
2012-05-10 13:07 Nickko Status feedback => assigned
2012-05-10 13:13 c_schmitz Note Added: 18656
2012-05-10 13:13 c_schmitz Status assigned => closed
2012-05-10 13:13 c_schmitz Resolution open => no change required