Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<description />

<dependencies>
<!-- Add other dependencies from parent's pom: <dependency> <groupId>org.other.library</groupId>
<!-- Add other dependencies from parent's pom: <dependency> <groupId>org.other.library</groupId>
<artifactId>library-name</artifactId> </dependency> -->

<!-- Begin OpenMRS core -->
Expand Down Expand Up @@ -65,7 +65,7 @@
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
Expand All @@ -74,13 +74,19 @@
<groupId>com.github.jknack</groupId>
<artifactId>handlebars</artifactId>
</dependency>

<dependency>
<groupId>org.owasp.encoder</groupId>
<artifactId>encoder</artifactId>
<version>1.2</version>
</dependency>

<dependency>
<groupId>org.owasp.encoder</groupId>
<artifactId>encoder</artifactId>
<version>1.2.3</version>
</dependency>

</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
package org.openmrs.ui.framework;

import org.owasp.encoder.Encode;

public class UiFrameworkException extends RuntimeException {

private static final long serialVersionUID = 1L;

public UiFrameworkException() {
super();
}

public UiFrameworkException(String message) {
super(message);
super(getEncodedMessage(message));
}

public UiFrameworkException(String message, Throwable throwable) {
super(message, throwable);
super(getEncodedMessage(message), throwable);
}

private static String getEncodedMessage(String message) {
return message == null ? null : Encode.forHtml(message);
}

}
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<target>1.6</target>
<source>1.6</source>
<target>1.8</target>
<source>1.8</source>
</configuration>
</plugin>
<plugin>
Expand Down