← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17351: Fixed bug - The editor not showing international characters correctly ( tracker web-maintenance s...

 

------------------------------------------------------------
revno: 17351
committer: Tran Chau<tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-11-03 20:35:42 +0700
message:
  Fixed bug - The editor not showing international characters correctly ( tracker web-maintenance side ).
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/attributeInListNoProgram.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/attributeVisitSchedule.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/caseAggregation.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/caseAggregationForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/expressionBuilderForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/jsonOptions.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programIndicator.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programIndicatorForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programReminder.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programStage.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programStageReminder.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programStageSection.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programStageSectionSortOder.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programUserrole.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programValidationList.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/trackedEntityForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateAttibuteForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateCaseAggregation.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramIndicator.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramReminder.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramStageForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramStageReminder.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramStageSectionForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateSingleProgramValidationForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateTrackedEntity.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateValidationCriteria.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/validationCriteria.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/viewDataEntryForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/viewTrackedEntityForm.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-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/attributeInListNoProgram.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/attributeInListNoProgram.vm	2014-06-02 02:07:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/attributeInListNoProgram.vm	2014-11-03 13:35:42 +0000
@@ -56,7 +56,7 @@
 		<td>
 			<select style="height:200px;width:100%;margin-top:22px;" multiple="multiple" id="selectedAttributeIds" name="selectedAttributeIds" size="15" ondblclick="moveSelectedById( 'selectedAttributeIds', 'availableAttributes' )" >
 				#foreach($attribute in $selectedAttributes)
-					<option value='$attribute.id'>$attribute.displayName</option>
+					<option value='$attribute.id'>$encoder.htmlEncode($attribute.displayName)</option>
 				#end
 			</select>
 		</td>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/attributeVisitSchedule.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/attributeVisitSchedule.vm	2014-06-02 02:07:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/attributeVisitSchedule.vm	2014-11-03 13:35:42 +0000
@@ -45,7 +45,7 @@
 		<td>
 			<select style="height:200px;width:100%;margin-top:22px;" multiple="multiple" id="selectedAttributeIds" name="selectedAttributeIds" size="15" ondblclick="moveSelectedById( 'selectedAttributeIds', 'availableAttributes' )" >
 				#foreach($attribute in $selectedAttributes)
-					<option value='$attribute.id'>$attribute.name</option>
+					<option value='$attribute.id'>$encoder.htmlEncode($attribute.name)</option>
 				#end
 			</select>
 		</td>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/caseAggregation.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/caseAggregation.vm	2014-08-03 16:27:47 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/caseAggregation.vm	2014-11-03 13:35:42 +0000
@@ -29,7 +29,7 @@
 				<select id='dataSetId' name='dataSetId' onchange='getCaseAggConditionByDataset();'>
 					<option value=''>[ $i18n.getString( "all" ) ]</option>
 					#foreach( $dataSet in $dataSets )
-					<option value='$dataSet.id' #if( $dataSetId=="$dataSet.id") selected #end >$dataSet.displayName</option>
+					<option value='$dataSet.id' #if( $dataSetId=="$dataSet.id") selected #end >$encoder.htmlEncode($dataSet.displayName)</option>
 					#end
 				</select>
 			</td>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/caseAggregationForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/caseAggregationForm.vm	2014-10-04 15:48:07 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/caseAggregationForm.vm	2014-11-03 13:35:42 +0000
@@ -89,8 +89,8 @@
 							#if($attribute.valueType=='age')
 								#set($attId=$attribute.id + ".age")
 								#set($attVisitId=$attribute.id + ".visit")
-								<option optionSet="$!attribute.optionSet.uid" title="$attribute.displayName" value="[CA:$attId]">$attribute.displayName ($i18n.getString('ages'))</option>
-								<option optionSet="$!attribute.optionSet.uid" value="[PS:*] AND [CA:$attVisitId]" name="multiProgram">$attribute.displayName ($i18n.getString( "age_at_visit_days_since_birth" ))</option>
+								<option optionSet="$!attribute.optionSet.uid" title="$attribute.displayName" value="[CA:$attId]">$encoder.htmlEncode($attribute.displayName) ($i18n.getString('ages'))</option>
+								<option optionSet="$!attribute.optionSet.uid" value="[PS:*] AND [CA:$attVisitId]" name="multiProgram">$encoder.htmlEncode($attribute.displayName) ($i18n.getString( "age_at_visit_days_since_birth" ))</option>
 							#else
 								<option optionSet="$!attribute.optionSet.uid"  title="$attribute.displayName" value="[CA:$attribute.id]">$attribute.displayName</option>
 							#end
@@ -102,9 +102,9 @@
 								#set($attId=$attribute.id + ".age")
 								#set($attVisitId=$attribute.id + ".visit")
 								<option optionSet="$!attribute.optionSet.uid"  optionSet="" title="$attribute.displayName" value="[CA:$attId]">$attribute.displayName ($i18n.getString('ages'))</option>
-								<option optionSet="$!attribute.optionSet.uid"  value="[PS:*] AND [CA:$attVisitId]" name="multiProgram">$attribute.displayName ($i18n.getString( "age_at_visit_days_since_birth" ))</option>
+								<option optionSet="$!attribute.optionSet.uid"  value="[PS:*] AND [CA:$attVisitId]" name="multiProgram">$encoder.htmlEncode($attribute.displayName) ($i18n.getString( "age_at_visit_days_since_birth" ))</option>
 							#else
-								<option optionSet="$!attribute.optionSet.uid" title="$attribute.displayName" value="[CA:$attribute.id]">$attribute.displayName</option>
+								<option optionSet="$!attribute.optionSet.uid" title="$attribute.displayName" value="[CA:$attribute.id]">$encoder.htmlEncode($attribute.displayName)</option>
 							#end
 						#end
 					</select>
@@ -188,7 +188,7 @@
 			<fieldset>
 				<legend>$i18n.getString( "condition" ) <em title="$i18n.getString( 'required' )" class="required">*</em></legend>
 				<table style="width:100%"><tr><td>
-					<textarea id="aggregationCondition" name="aggregationCondition" onkeyup='getConditionDescription();' maxlength="1000" style="width:100%">$!caseAggregation.aggregationExpression</textarea>
+					<textarea id="aggregationCondition" name="aggregationCondition" onkeyup='getConditionDescription();' maxlength="1000" style="width:100%">$!encoder.htmlEncode($caseAggregation.aggregationExpression)</textarea>
 				</td></tr></table>
 			</fieldset>
 		</td>
@@ -198,7 +198,7 @@
 		<td>
 			<fieldset>
 				<legend>$i18n.getString( "description" )</legend>
-				<div id='aggregationDescription'>$!description</div>
+				<div id='aggregationDescription'>$!encoder.htmlEncode($description)</div>
 			</fieldset>
 		</td>
 	</tr>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/expressionBuilderForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/expressionBuilderForm.vm	2014-08-06 15:20:54 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/expressionBuilderForm.vm	2014-11-03 13:35:42 +0000
@@ -26,7 +26,7 @@
 					<select id='leftStage' name='leftStage' onchange="getLeftPrgramStageDataElements();" style='width:320px;'>
 						<option value=''>[$i18n.getString( "please_select" )]</option>
 						#foreach($stage in $program.programStages)
-						<option value='$stage.id'>$stage.name</option>
+						<option value='$stage.id'>$encoder.htmlEncode($stage.name)</option>
 						#end
 					</select>
 				</td>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/jsonOptions.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/jsonOptions.vm	2014-08-11 14:41:04 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/jsonOptions.vm	2014-11-03 13:35:42 +0000
@@ -1,2 +1,2 @@
-{ "options": [#foreach( $option in $options ){"c":"$option.code","n":"$option.name"}#if( $velocityCount < $options.size() ),#end #end]
+{ "options": [#foreach( $option in $options ){"c":"$option.code","n":"$encoder.htmlEncode($option.name)"}#if( $velocityCount < $options.size() ),#end #end]
 }
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programIndicator.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programIndicator.vm	2014-06-13 10:58:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programIndicator.vm	2014-11-03 13:35:42 +0000
@@ -9,7 +9,7 @@
   </ul>
 </div>
 
-<h4>$program.displayName</h4>
+<h4>$encoder.htmlEncode($program.displayName)</h4>
 
 <input type='hidden' id='id' name='id' value='$program.id'>
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programIndicatorForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programIndicatorForm.vm	2014-08-06 15:20:54 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programIndicatorForm.vm	2014-11-03 13:35:42 +0000
@@ -62,7 +62,7 @@
 			<fieldset>
 				<legend>$i18n.getString( "expression" ) <em title="$i18n.getString( "required" )" class="required">*</em></legend>
 				<table><tr><td>
-					<textarea style="width:660px" id="expression" name="expression" onkeyup='getConditionDescription();' >$!programIndicator.expression</textarea>
+					<textarea style="width:660px" id="expression" name="expression" onkeyup='getConditionDescription();' >$encoder.htmlEncode($!programIndicator.expression)</textarea>
 				</td></tr></table>
 			</fieldset>
 		</td>
@@ -72,7 +72,7 @@
 		<td>
 			<fieldset>
 				<legend>$i18n.getString( "description" )</legend>
-				<div id='aggregationDescription'>$!description</div>
+				<div id='aggregationDescription'>$!encoder.htmlEncode($description)</div>
 			</fieldset>
 		</td>
 	</tr>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programReminder.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programReminder.vm	2014-06-13 10:58:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programReminder.vm	2014-11-03 13:35:42 +0000
@@ -1,6 +1,6 @@
 
 <h3>$i18n.getString( "template_reminder_message" ) #openHelp( "program_templete_reminder" )</h3>
-<h5>$program.displayName</h5>
+<h5>$encoder.htmlEncode($program.displayName)</h5>
 
 <div id="contextMenu" class="contextMenu">
   <ul id="contextMenuItems" class="contextMenuItems">

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programStage.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programStage.vm	2014-10-06 10:11:29 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programStage.vm	2014-11-03 13:35:42 +0000
@@ -1,6 +1,6 @@
 <h3>$i18n.getString( "program_stage_management" ) #openHelp( "program_stage" )</h3>
 
-<h4>$program.displayName</h4>
+<h4>$encoder.htmlEncode($program.displayName)</h4>
 
 <div id="contextMenu" class="contextMenu" style="width: 230px;">
   <ul id="contextMenuItems" class="contextMenuItems">

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programStageReminder.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programStageReminder.vm	2014-06-13 10:58:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programStageReminder.vm	2014-11-03 13:35:42 +0000
@@ -1,6 +1,6 @@
 
 <h3>$i18n.getString( "template_reminder_message" )</h3>
-<h5>$programStage.displayName</h5>
+<h5>$encoder.htmlEncode($programStage.displayName)</h5>
 
 <div id="contextMenu" class="contextMenu">
   <ul id="contextMenuItems" class="contextMenuItems">

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programStageSection.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programStageSection.vm	2014-06-13 10:58:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programStageSection.vm	2014-11-03 13:35:42 +0000
@@ -1,6 +1,6 @@
 <h3>$i18n.getString( "program_stage_section" )</h3>
 
-<h4>$programStage.displayName</h4>
+<h4>$encoder.htmlEncode($programStage.displayName)</h4>
 
 <div id="contextMenu" class="contextMenu">
   <ul id="contextMenuItems" class="contextMenuItems">

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programStageSectionSortOder.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programStageSectionSortOder.vm	2013-02-03 10:13:17 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programStageSectionSortOder.vm	2014-11-03 13:35:42 +0000
@@ -1,6 +1,6 @@
 <h3>$i18n.getString( "program_stage_section_sort_order" )</h3>
 
-<h4>$programStage.displayName</h4>
+<h4>$encoder.htmlEncode($programStage.displayName)</h4>
 
 <form id="programStageSectionSortOrderForm" name="programStageSectionSortOrderForm" onsubmit="selectAllById('sectionIds');" action="saveProgramStageSectionSortOrder.action" method="post">
 
@@ -11,7 +11,7 @@
 		<td>
 			<select id='sectionIds' name='sectionIds'multiple style='width:400px;height:200px'>
 				#foreach( $section in $programStage.programStageSections )
-					<option value='$section.id'>$section.displayName</option>
+					<option value='$section.id'>$encoder.htmlEncode($section.displayName)</option>
 				#end
 			</select>
 		</td>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programUserrole.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programUserrole.vm	2014-06-04 09:39:16 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programUserrole.vm	2014-11-03 13:35:42 +0000
@@ -1,6 +1,6 @@
 <h3>$i18n.getString( "assign_program_to_userroles" )</h3>
 
-<h4>$program.displayName</h4>
+<h4>$encoder.htmlEncode($program.displayName)</h4>
 
 <form name="userRole" action="defineProgramUserrole.action" method="POST" onsubmit="selectAllById( 'userRoleIds' );">
 <input type="hidden" name="id" value="$program.id"/>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programValidationList.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programValidationList.vm	2014-06-13 10:58:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programValidationList.vm	2014-11-03 13:35:42 +0000
@@ -1,6 +1,6 @@
 <h3>$i18n.getString( "program_validation_rule_management" ) #openHelp( "program_validation_rule" )</h3>
 
-<h4>$program.displayName</h4>
+<h4>$encoder.htmlEncode($program.displayName)</h4>
 
 <div id="contextMenu" class="contextMenu">
   <ul id="contextMenuItems" class="contextMenuItems">

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/trackedEntityForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/trackedEntityForm.vm	2014-08-04 02:40:12 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/trackedEntityForm.vm	2014-11-03 13:35:42 +0000
@@ -42,9 +42,9 @@
 						data-name="$encoder.htmlEncode( $!program.displayName )">
 						
 						#if($mapRegistrationForms.get($program.id))
-							<td><a>$program.name</a></td>
+							<td><a>$encoder.htmlEncode($program.name)</a></td>
 						#else
-							<td>$program.name</td>
+							<td>$encoder.htmlEncode($program.name)</td>
 						#end
 					</tr>
 				#end

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateAttibuteForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateAttibuteForm.vm	2014-09-08 10:02:47 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateAttibuteForm.vm	2014-11-03 13:35:42 +0000
@@ -88,7 +88,7 @@
 		<td><label for="optionSetId">$i18n.getString( "option_set" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
 		<td><select id="optionSetId" name="optionSetId" class="{validate:{required:true}}">
 				#foreach($optionSet in $optionSets)
-					<option value="$optionSet.id" #if($attribute.optionSet.id==$optionSet.id) selected #end>$optionSet.name</option>
+					<option value="$optionSet.id" #if($attribute.optionSet.id==$optionSet.id) selected #end>$encoder.htmlEncode($optionSet.name)</option>
 				#end
 			</select>
 		</td>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateCaseAggregation.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateCaseAggregation.vm	2014-08-11 13:54:43 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateCaseAggregation.vm	2014-11-03 13:35:42 +0000
@@ -24,7 +24,7 @@
 	
     <tr>
         <td><label for="name">$i18n.getString( "name" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
-        <td><input type="text" id="name" name="name" value="$caseAggregation.name"></td>
+        <td><input type="text" id="name" name="name" value="$encoder.htmlEncode(caseAggregation.name)"></td>
     </tr>
     
     <tr>
@@ -33,7 +33,7 @@
 			<select id="dataSets" name="dataSets" onchange="getDataElementsByDataset();">
 				<option value="">[$i18n.getString('please_select')]</option>
 				#foreach( $ds in $dataSets)
-					<option value="$ds.id" #if( $dataSet.id=="$ds.id") selected #end >$ds.displayName</option>
+					<option value="$ds.id" #if( $dataSet.id=="$ds.id") selected #end >$encoder.htmlEncode($ds.displayName)</option>
 				#end
 			</select>
 		</td>				
@@ -88,7 +88,7 @@
 		<td>
 			<select id="deSumId" name="deSumId" #if( $caseAggregation.deSum ) #else disabled #end>
 				#if( $caseAggregation.deSum )
-				<option value='$caseAggregation.deSum.id'>$caseAggregation.deSum.displayName</option>
+				<option value='$caseAggregation.deSum.id'>$encoder.htmlEncode($caseAggregation.deSum.displayName)</option>
 				#end
 			</select>
 		</td>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramForm.vm	2014-08-26 12:43:04 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramForm.vm	2014-11-03 13:35:42 +0000
@@ -102,7 +102,7 @@
 				<select id='trackedEntityId' name='trackedEntityId' class="{validate:{required:true}}">
 					<option value=''>[$i18n.getString('please_select')]</option>
 					#foreach($trackedEntity in $trackedEntities)
-					<option value='$trackedEntity.id' #if($trackedEntity.id==$program.trackedEntity.id) selected #end >$trackedEntity.displayName</option>
+					<option value='$trackedEntity.id' #if($trackedEntity.id==$program.trackedEntity.id) selected #end >$encoder.htmlEncode($trackedEntity.displayName)</option>
 					#end
 				</select>
 			</td>
@@ -255,7 +255,7 @@
 			<td>
 				<select size="15" style="width:100%;" multiple id="availablePropertyIds" name="availablePropertyIds" ondblclick="selectProperties();" #if( $program.type=='3' ) disabled #end>
 					#foreach( $attribute in $availableAttributes )
-						<option value="attr_$attribute.id" valuetype='$attribute.valueType'>$attribute.displayName</option>
+						<option value="attr_$attribute.id" valuetype='$attribute.valueType'>$encoder.htmlEncode($attribute.displayName)</option>
 					#end
 				</select>
 			</td>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramIndicator.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramIndicator.vm	2014-08-06 15:20:54 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramIndicator.vm	2014-11-03 13:35:42 +0000
@@ -32,22 +32,22 @@
     </thead>
 	<tr>
 		<td><label for="name">$i18n.getString( "name" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
-		<td><input type="text" id="name" name="name" value='$programIndicator.name'></td>
+		<td><input type="text" id="name" name="name" value='$encoder.htmlEncode($programIndicator.name)'></td>
 		<td></td>
 	</tr>	
 	<tr>
 		<td><label for="shortName">$i18n.getString( "short_name" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
-		<td><input type="text" id="shortName" name="shortName" value='$programIndicator.shortName'></td>
+		<td><input type="text" id="shortName" name="shortName" value='$encoder.htmlEncode($programIndicator.shortName)'></td>
 		<td></td>
 	</tr>	
 	<tr>
 		<td><label for="code">$i18n.getString( "code" )</label></td>
-		<td><input type="text" id="code" name="code" value='$programIndicator.code'></td>
+		<td><input type="text" id="code" name="code" value='$encoder.htmlEncode($programIndicator.code)'></td>
 		<td></td>
 	</tr>	
 	<tr>
 		<td><label for="description">$i18n.getString( "description" ) </label></td>
-		<td><textarea type="text" id="description" name="description">$programIndicator.description</textarea></td>
+		<td><textarea type="text" id="description" name="description">$encoder.htmlEncode($programIndicator.description)</textarea></td>
 		<td></td>
 	</tr>
 	<tr>
@@ -77,7 +77,7 @@
 				<select id="programStageId" name="programStageId" onChange="getTrackedEntityDataElements();">
 					<option value=''>[$i18n.getString('please_select')]</option>
 					#foreach( $programStage in $programIndicator.program.programStages )
-					<option value='$programStage.id'>$programStage.displayName</option>
+					<option value='$programStage.id'>$encoder.htmlEncode($programStage.displayName)</option>
 					#end
 				</select>
 			</td>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramReminder.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramReminder.vm	2014-10-14 14:04:11 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramReminder.vm	2014-11-03 13:35:42 +0000
@@ -51,7 +51,7 @@
 </script>
 
 <h3>$i18n.getString( "edit_template_reminder_message" ) #openHelp( "program_template_reminder" )</h3>
-<h5>$program.displayName</h5>
+<h5>$encoder.htmlEncode($program.displayName)</h5>
 
 <form id="updateReminderForm" name="updateReminderForm" action="updateProgramReminder.action" method="get" onsubmit="selectAllById('selectedPropertyIds');" class="inputForm">
 
@@ -153,14 +153,14 @@
 					<option value="{days-since-enrollement-date}">$i18n.getString("days_since_enrollment_date")</option>
 					<option value="{orgunit-name}">$i18n.getString("orgunit_name")</option>
 					#foreach($attribute in $attributes)
-						<option value={attributeid=$attribute.uid}>$attribute.displayName</option>
+						<option value={attributeid=$attribute.uid}>$encoder.htmlEncode($attribute.displayName)</option>
 					#end
 				</select>
 			</td>
 		</tr>
 		<tr>
 			<td><label for="templateMessage">$i18n.getString( "message" )</label></td>
-			<td><textarea onkeyup="getMessageLength()" id="templateMessage" name="templateMessage" class="templateMessage">$reminder.templateMessage</textarea></td>
+			<td><textarea onkeyup="getMessageLength()" id="templateMessage" name="templateMessage" class="templateMessage">$encoder.htmlEncode($reminder.templateMessage)</textarea></td>
 		</tr>
 		<tr>
 			<td></td>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramStageForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramStageForm.vm	2014-08-18 14:21:48 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramStageForm.vm	2014-11-03 13:35:42 +0000
@@ -10,7 +10,7 @@
 
 <h3>$i18n.getString( "edit_program_stage" ) #openHelp( "program_stage_information" )</h3>
 
-<h4>$programStage.program.displayName</h4>
+<h4>$encoder.htmlEncode($programStage.program.displayName)</h4>
 
 <form id="updateProgramStageForm" name="updateProgramStageForm" action="updateProgramStage.action" method="post" class="inputForm">
 	<input type="hidden" id="id" name="id" value="$programStage.id"/>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramStageReminder.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramStageReminder.vm	2014-10-14 14:04:11 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramStageReminder.vm	2014-11-03 13:35:42 +0000
@@ -23,7 +23,7 @@
 </script>
 
 <h3>$i18n.getString( "edit_template_reminder_message" ) #openHelp( "program_stage_template_reminder" )</h3>
-<h5>$programStage.displayName</h5>
+<h5>$encoder.htmlEncode($programStage.displayName)</h5>
 
 <form id="updateReminderForm" name="updateReminderForm" action="updateProgramStageReminder.action" method="get" onsubmit="selectAllById('selectedPropertyIds');" class="inputForm">
 
@@ -115,14 +115,14 @@
 					<option value="{days-since-due-date}">$i18n.getString("days_since_due_date")</option>'
 					<option value="{orgunit-name}">$i18n.getString("orgunit_name")</option>
 					#foreach($attribute in $attributes)
-						<option value={attributeid=$attribute.uid}>$attribute.displayName</option>
+						<option value={attributeid=$attribute.uid}>$encoder.htmlEncode($attribute.displayName)</option>
 					#end
 				</select>
 			</td>
 		</tr>
 		<tr>
 			<td><label for="message">$i18n.getString( "message" )</label></td>
-			<td><textarea onkeyup="getMessageLength()" id="templateMessage" name="templateMessage" style="width:320px" class="templateMessage">$reminder.templateMessage</textarea></td>
+			<td><textarea onkeyup="getMessageLength()" id="templateMessage" name="templateMessage" style="width:320px" class="templateMessage">$encoder.htmlEncode($reminder.templateMessage)</textarea></td>
 		</tr>
 		<tr>
 			<td></td>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramStageSectionForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramStageSectionForm.vm	2014-08-06 15:20:54 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramStageSectionForm.vm	2014-11-03 13:35:42 +0000
@@ -22,7 +22,7 @@
 
 <h3>$i18n.getString( "update_program_stage_section" )</h3>
 			
-<h4>$programStage.displayName</h4>
+<h4>$encoder.htmlEncode($programStage.displayName)</h4>
 			
 <form id="programStageSectionForm" name="programStageSectionForm" action="updateProgramStageSection.action" method="post" class="inputForm">
 	<input type="hidden" id="programStageId" name="programStageId" value="$programStage.id"/>
@@ -35,7 +35,7 @@
 	<tbody>
 		<tr>
 			<td><label for="name">$i18n.getString( "name" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-			<td><input type="text" id="name" name="name" value='$section.name'/></td>
+			<td><input type="text" id="name" name="name" value='$encoder.htmlEncode($section.name)'/></td>
 		</tr>
 	</tbody>
 </table>
@@ -62,7 +62,7 @@
         <td>
             <select style="width:100%;" size="15" id="availableList" name='availableList' multiple="multiple" ondblclick="moveSelectedById( 'availableList', 'dataElementIds' );">
 				#foreach( $psDataElement in $availableDataElements )
-					<option value='$psDataElement.dataElement.id'>$psDataElement.dataElement.name</option>
+					<option value='$psDataElement.dataElement.id'>$encoder.htmlEncode($psDataElement.dataElement.name)</option>
 				#end
 			</select>
         </td>
@@ -77,7 +77,7 @@
 		<td>
 			<select style="width:100%;" size="15" id="dataElementIds" name='dataElementIds' multiple="multiple"  ondblclick="moveSelectedById( 'dataElementIds', 'availableList' );">
 				#foreach( $psDataElement in $section.programStageDataElements )
-					<option value='$psDataElement.dataElement.id'>$psDataElement.dataElement.name</option>
+					<option value='$psDataElement.dataElement.id'>$encoder.htmlEncode($psDataElement.dataElement.name)</option>
 				#end
 			</select>
 		</td>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateSingleProgramValidationForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateSingleProgramValidationForm.vm	2014-08-06 15:20:54 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateSingleProgramValidationForm.vm	2014-11-03 13:35:42 +0000
@@ -1,6 +1,6 @@
 <h3>$i18n.getString( "update_program_validation_rule" )</h3>
 
-<h4>$validation.program.displayName</h4>
+<h4>$encoder.htmlEncode($validation.program.displayName)</h4>
 
 <form id='programValidationForm' name='programValidationForm' method='post' action='updateProgramValidation.action' class="inputForm">
 
@@ -18,7 +18,7 @@
 	<tr>
 		<td><label for="name">$i18n.getString('name') <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
 		<td>			
-			<input type="text" id='name' name='name' value="$validation.name" >
+			<input type="text" id='name' name='name' value="$encoder.htmlEncode($validation.name)" >
 		</td>
 	</tr>
 	<tr>
@@ -39,15 +39,15 @@
 		<td></td>
 		<td>
 			<input type="button" value="$i18n.getString( 'edit_left_side' )" onclick="editLeftExpression();" style="width:10em">
-			<input type="hidden" id="leftSideDescription" name="leftSideDescription" value="$!validation.leftSide.description">
-			<input type="hidden" id="leftSideExpression" name="leftSideExpression" value="$!validation.leftSide.expression" class="{validate:{required:true}}">
-			<input type="hidden" id="leftSideTextualExpression" name="leftSideTextualExpression" value="$!leftSideTextualExpression">
+			<input type="hidden" id="leftSideDescription" name="leftSideDescription" value="$!encoder.htmlEncode($validation.leftSide.description)">
+			<input type="hidden" id="leftSideExpression" name="leftSideExpression" value="$!encoder.htmlEncode($validation.leftSide.expression)" class="{validate:{required:true}}">
+			<input type="hidden" id="leftSideTextualExpression" name="leftSideTextualExpression" value="$!encoder.htmlEncode($leftSideTextualExpression)">
 			<input type="hidden" id="leftSideNullIfBlank" name="leftSideNullIfBlank" value="$!validation.leftSide.nullIfBlank">
 			
 			<input type="button" value="$i18n.getString( 'edit_right_side' )" onclick="editRightExpression();" style="width:10em">
-			<input type="hidden" id="rightSideDescription" name="rightSideDescription" value="$!validation.rightSide.description">
-			<input type="hidden" id="rightSideExpression" name="rightSideExpression" value="$!validation.rightSide.expression" class="{validate:{required:true}}">
-			<input type="hidden" id="rightSideTextualExpression" name="rightSideTextualExpression" value="$!rightSideTextualExpression">
+			<input type="hidden" id="rightSideDescription" name="rightSideDescription" value="$!encoder.htmlEncode($validation.rightSide.description)">
+			<input type="hidden" id="rightSideExpression" name="rightSideExpression" value="$!encoder.htmlEncode($validation.rightSide.expression)" class="{validate:{required:true}}">
+			<input type="hidden" id="rightSideTextualExpression" name="rightSideTextualExpression" value="$!encoder.htmlEncode($rightSideTextualExpression)">
 			<input type="hidden" id="rightSideNullIfBlank" name="rightSideNullIfBlank" value="$!validation.rightSide.nullIfBlank">
 		</td>
 		</td>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateTrackedEntity.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateTrackedEntity.vm	2014-08-06 15:20:54 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateTrackedEntity.vm	2014-11-03 13:35:42 +0000
@@ -23,13 +23,13 @@
     <tbody>
 		<tr>
 			<td><label for="name">$i18n.getString( "name" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-			<td><input type="text" id="name" name="name" class="{validate:{required:true,rangelength:[2,160]}}" value='$trackedEntity.name' /></td>
+			<td><input type="text" id="name" name="name" class="{validate:{required:true,rangelength:[2,160]}}" value='$encoder.htmlEncode($trackedEntity.name)' /></td>
 			<td></td>
 		</tr>   
 		
 		<tr>
 			<td><label for="description">$i18n.getString( "description" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-			<td><input type="text" id="description" name="description" class="{validate:{required:true,minlength:2}}" value='$trackedEntity.description' /></td>
+			<td><input type="text" id="description" name="description" class="{validate:{required:true,minlength:2}}" value='$encoder.htmlEncode($trackedEntity.description)' /></td>
 			<td></td>
 		</tr>
     </tbody>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateValidationCriteria.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateValidationCriteria.vm	2014-08-06 15:20:54 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateValidationCriteria.vm	2014-11-03 13:35:42 +0000
@@ -1,7 +1,7 @@
 <script type="text/javascript" src="javascript/updateValidationCriteria.js"></script>																
 
 <h3>$i18n.getString( "edit_validation_criteria" ) #openHelp( "validation_criteria" )</h3>
-<h5>$program.displayName</h5>
+<h5>$encoder.htmlEncode($program.displayName)</h5>
 
 <form id="validationCriteriaForm" action="updateValidationCriteria.action" method="post" class="inputForm">
 	<input type='hidden' id='programId' name='programId' value='$program.id' />
@@ -12,11 +12,11 @@
 		</tr>
 		<tr>
 			<td><label for="name">$i18n.getString('name') <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-			<td colspan="2"><input type='text' id='name' name='name' value="$validationCriteria.name" /></td>
+			<td colspan="2"><input type='text' id='name' name='name' value="$encoder.htmlEncode($validationCriteria.name)" /></td>
 		</tr>
 		<tr>
 			<td><label for="description">$i18n.getString('description') <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-			<td colspan="2"><input type='text' id='description' name='description' value="$validationCriteria.description" /></td>
+			<td colspan="2"><input type='text' id='description' name='description' value="$encoder.htmlEncode($validationCriteria.description)" /></td>
 		</tr>
 		<tr>
 			<td><label for="property">$i18n.getString('criteria')<em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
@@ -33,7 +33,7 @@
 										#foreach($option in $programAttribute.attribute.optionSet.options)
 											#set($opt=$opt + ';' + $option )
 										#end 
-										<option valuetype='$programAttribute.attribute.valueType' value="$programAttribute.attribute.uid" opt="$opt" #if($validationCriteria.property==$$programAttribute.attribute.uid) #set($attribute = $$programAttribute.attribute) selected #end>$programAttribute.attribute.displayName</option>
+										<option valuetype='$programAttribute.attribute.valueType' value="$programAttribute.attribute.uid" opt="$opt" #if($validationCriteria.property==$$programAttribute.attribute.uid) #set($attribute = $$programAttribute.attribute) selected #end>$encoder.htmlEncode($programAttribute.attribute.displayName)</option>
 									#end
 								#end
 							</select>
@@ -46,7 +46,7 @@
 							</select>
 						</td>
 						<td id='valueTD'>
-							<input type='text' id='value' name='value' style="width:140px;" value='$validationCriteria.value' />
+							<input type='text' id='value' name='value' style="width:140px;" value='$encoder.htmlEncode($validationCriteria.value)' />
 						</td>
 					</tr>
 				</table>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/validationCriteria.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/validationCriteria.vm	2014-06-13 10:58:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/validationCriteria.vm	2014-11-03 13:35:42 +0000
@@ -1,5 +1,5 @@
 <h3>$i18n.getString( "validation_criteria_management" )  #openHelp( "validation_criteria" )</h3>
-<h5>$program.displayName</h5>
+<h5>$encoder.htmlEncode($program.displayName)</h5>
 
 <div id="contextMenu" class="contextMenu" style="width: 210px;">
   <ul id="contextMenuItems" class="contextMenuItems">

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/viewDataEntryForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/viewDataEntryForm.vm	2014-06-26 21:14:27 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/viewDataEntryForm.vm	2014-11-03 13:35:42 +0000
@@ -83,7 +83,7 @@
 		<tr>
 			<td>
 				<label for="name">$i18n.getString( "name" ) <em title="$i18n.getString( "required" )" class="required">*</em></label>
-				<input type="text" id="name" value="$!dataEntryForm.name" name="name" class="{validate:{required:true,rangelength:[4,150],alphanumericwithbasicpuncspaces:true,firstletteralphabet:false}}" style="margin-left:15px;width:30em;">
+				<input type="text" id="name" value="$!encoder.htmlEncode($dataEntryForm.name)" name="name" class="{validate:{required:true,rangelength:[4,150],alphanumericwithbasicpuncspaces:true,firstletteralphabet:false}}" style="margin-left:15px;width:30em;">
 			</td>				
 		</tr>	
 	</table>  
@@ -144,13 +144,13 @@
 				<select id="dataElementIds" name="dataElementIds" style="height:200px; width:100%;"  multiple="multiple" size="10" ondblclick="insertDataElement( '#dataElementSelection', '$programStage.uid')">
 					#foreach( $de in $dataElements)
 					#set($deJSON = '{' + '"uid"' + ':"' + "$de.uid" + '",' + '"name"' + ':"' + "$de.name" + '",' + '"shortName"' + ':"' + "$de.shortName" + '",' + '"type"' + ':"' + "$de.getDetailedTextType()"  + '"}' )
-					<option value='$deJSON' decode="$!de.code" dename="$de.name" title="$de.name">$encoder.htmlEncode( $de.name )</option>
+					<option value='$deJSON' decode="$!de.code" dename="$encoder.htmlEncode($de.name)" title="$encoder.htmlEncode($de.name)">$encoder.htmlEncode( $de.name )</option>
 					#end
 				</select>
 				<select id="dataElementIdsStore" multiple="multiple" style="display:none">
 					#foreach( $de in $dataElements)
 					#set($deJSON = '{' + '"uid"' + ':"' + "$de.uid" + '",' + '"name"' + ':"' + "$de.name" + '",' + '"shortName"' + ':"' + "$de.shortName" + '",' + '"type"' + ':"' + "$de.getDetailedTextType()"  + '"}' )
-					<option value='$deJSON' decode="$!de.code" dename="$de.name">$encoder.htmlEncode( $de.name )</option>
+					<option value='$deJSON' decode="$!de.code" dename="$encoder.htmlEncode($de.name)">$encoder.htmlEncode( $de.name )</option>
 					#end
 				</select>
 			</td>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/viewTrackedEntityForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/viewTrackedEntityForm.vm	2014-10-06 12:00:42 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/viewTrackedEntityForm.vm	2014-11-03 13:35:42 +0000
@@ -71,7 +71,7 @@
 				<label>$i18n.getString( "name" ) <em title="$i18n.getString( "required" )" class="required">*</em></label>
 			</td>
 			<td>
-				<input type="text" id="name" value="$!registrationForm.dataEntryForm.name" name="name" class="{validate:{required:true,rangelength:[4,150],alphanumericwithbasicpuncspaces:true,firstletteralphabet:false}}" style="width:30em;" >
+				<input type="text" id="name" value="$!encoder.htmlEncode($registrationForm.dataEntryForm.name)" name="name" class="{validate:{required:true,rangelength:[4,150],alphanumericwithbasicpuncspaces:true,firstletteralphabet:false}}" style="width:30em;" >
 			</td>			
 		</tr>
 		<tr>