Hello!
I tried something like this (with the latest LimeSurvey (or actually 5 days old)):
docs.limesurvey.org/tiki-index.php?page=..._Question_Validation
I read somewhere in the forum that
there is a filter for security reasons which filters javascript input to prevent XSS attacs. Check config-defaults.php for a setting like "$filterxsshtml", copy this setting to config.php and disable the filterSo in config.php I put $filterxsshtml = false; as a last line before ?>.
So I go to LimeFitWin and source, there I have this:
<p>INFO:<br />
Text of the question you want to ask<br />
<SCRIPT LANGUAGE="JavaScript">
n1 = "1"; // n1, n2 interpreted as strings
n2 = "2";
n1 = parseInt( n1 ); // convert to integer type
n2 = parseFloat( n2 ); // convert to floating point type
sum = n1 + n2; // n1, n2 summed as numbers
document.write ( "n1 = " + n1 + "<BR>" );
document.write ( "n2 = " + n2 + "<BR>" );
document.write( "sum = " + sum + "<BR>" );
</SCRIPT></p>
I also tried with
Not only with
| Code: |
<SCRIPT LANGUAGE="JavaScript">
|
When I edit the question (not in source mode) I only see
INFO:
Text of the question you want to ask
So that seems OK, but when I run the questions I see:
INFO:
n1 = "1"; // n1, n2 interpreted as strings
n2 = "2";
n1 = parseInt( n1 ); // convert to integer type
n2 = parseFloat( n2 ); // convert to floating point type
sum = n1 + n2; // n1, n2 summed as numbers
document.write ( "n1 = " + n1 + "
" );
document.write ( "n2 = " + n2 + "
" );
document.write( "sum = " + sum + "
" );
What do you think I have done wrong? Have I missed something in the config.php?