dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #43576
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 22094: switch from json encode to html encode for ouwt org unit tree display names
------------------------------------------------------------
revno: 22094
committer: Morten Olav Hansen <morten@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2016-03-01 20:46:01 +0700
message:
switch from json encode to html encode for ouwt org unit tree display names
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonOrganisationUnitTree.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonOrganisationUnitTreePartial.vm
--
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-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonOrganisationUnitTree.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonOrganisationUnitTree.vm 2015-12-01 10:01:35 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonOrganisationUnitTree.vm 2016-03-01 13:46:01 +0000
@@ -6,7 +6,8 @@
#if( ! $versionOnly )
,"organisationUnits": {
#foreach( $unit in $organisationUnits )
-"$!encoder.jsonEncode($unit.uid)":{"id":"$!encoder.jsonEncode($unit.uid)","n":"$!encoder.jsonEncode( ${unit.displayName} )","l":${unit.level},#if( $unit.parent )"pid":"$!encoder.jsonEncode($unit.parent.uid)",#end"c":[#foreach( $child in $unit.sortedChildren )"$!encoder.jsonEncode($child.uid)"#if( $velocityCount < $unit.children.size() ),#end#end]}
+"$!encoder.jsonEncode($unit.uid)":{"id":"$!encoder.jsonEncode($unit.uid)","n":"$!encoder.htmlEncode( ${unit.displayName} )","l":${unit.level},#if( $unit.parent )"pid":"$!encoder.jsonEncode($unit.parent.uid)",#end"c":[#foreach( $child in $unit.sortedChildren )
+"$!encoder.jsonEncode($child.uid)"#if( $velocityCount < $unit.children.size() ),#end#end]}
#if( $velocityCount < $organisationUnits.size() ),#end#end
}#end
}
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonOrganisationUnitTreePartial.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonOrganisationUnitTreePartial.vm 2015-12-01 10:01:35 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonOrganisationUnitTreePartial.vm 2016-03-01 13:46:01 +0000
@@ -4,6 +4,6 @@
,"roots": [ #foreach( $root in $rootOrganisationUnits )"$!encoder.jsonEncode($root.uid)"#if( $velocityCount < $rootOrganisationUnits.size() ),#end#end ]
,"organisationUnits": {
#foreach( $unit in $organisationUnits )
-"$!encoder.jsonEncode($unit.uid)":{"id":"$!encoder.jsonEncode($unit.uid)","n":"$!encoder.jsonEncode( ${unit.displayName} )",#if( $unit.parent )"pid":"$!encoder.jsonEncode($unit.parent.uid)",#end"c":[#foreach( $child in $unit.sortedChildren )"$!encoder.jsonEncode($child.uid)"#if( $velocityCount < $unit.children.size() ),#end#end]}
+"$!encoder.jsonEncode($unit.uid)":{"id":"$!encoder.jsonEncode($unit.uid)","n":"$!encoder.htmlEncode( ${unit.displayName} )",#if( $unit.parent )"pid":"$!encoder.jsonEncode($unit.parent.uid)",#end"c":[#foreach( $child in $unit.sortedChildren )"$!encoder.jsonEncode($child.uid)"#if( $velocityCount < $unit.children.size() ),#end#end]}
#if( $velocityCount < $organisationUnits.size() ),#end#end
}}
\ No newline at end of file