Skip to content

Commit

Permalink
Unescape XSS escaped address layout template
Browse files Browse the repository at this point in the history
  • Loading branch information
dkayiwa authored Dec 21, 2024
1 parent 9f3ba44 commit 9f2f2dc
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import java.util.ArrayList;
import java.util.List;

import org.apache.commons.lang.StringEscapeUtils;
import org.openmrs.GlobalProperty;
import org.openmrs.api.GlobalPropertyListener;
import org.openmrs.api.context.Context;
Expand Down Expand Up @@ -56,7 +57,7 @@ private void init() {

String layoutTemplateXml = Context.getAdministrationService().getGlobalProperty(
OpenmrsConstants.GLOBAL_PROPERTY_ADDRESS_TEMPLATE);
setAddressTemplate(layoutTemplateXml);
setAddressTemplate(StringEscapeUtils.unescapeXml(layoutTemplateXml));

List<String> specialTokens = new ArrayList<>();
specialTokens.add("address1");
Expand Down

0 comments on commit 9f2f2dc

Please sign in to comment.