dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #16700
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6411: (patient) Don't save datavalue with special charater.
------------------------------------------------------------
revno: 6411
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2012-03-28 16:26:26 +0700
message:
(patient) Don't save datavalue with special charater.
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js 2012-03-27 09:40:11 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js 2012-03-28 09:26:26 +0000
@@ -163,7 +163,12 @@
}
else if( $(this).attr('type') != 'button' )
{
- params += elementId + "="+ jQuery(this).val() + "&";
+ var value = "";
+ if( jQuery(this).val() != '' )
+ {
+ value = htmlEncode(jQuery(this).val());
+ }
+ params += elementId + "="+ value + "&";
}
});
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js 2012-03-28 07:10:48 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js 2012-03-28 09:26:26 +0000
@@ -387,7 +387,9 @@
this.save = function()
{
var params = 'dataElementId=' + dataElementId;
- params += '&value=' + value;
+ params += '&value=' ;
+ if( value != '')
+ params += htmlEncode(value);
$.ajax({
type: "POST",