Skip to content
This repository has been archived by the owner on Apr 6, 2022. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
[JENKINS-17309] Escape message texts that contain XML symbols.
  • Loading branch information
uhafner committed Aug 9, 2013
1 parent 2e19448 commit af19cb7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
14 changes: 3 additions & 11 deletions .settings/org.eclipse.core.resources.prefs
@@ -1,4 +1,6 @@
<<<<<<< HEAD
=\=\=\=\=\=\=
<<<<<<<=HEAD
>>>>>>>=branch 'master' of https\://github.com/habast/warnings-plugin.git
eclipse.preferences.version=1
encoding//src/main/java=ISO-8859-1
encoding//src/main/resources=ISO-8859-1
Expand All @@ -7,13 +9,3 @@ encoding//src/test/resources=ISO-8859-1
encoding//src/test/resources/hudson/plugins/warnings/parser/issue7178.txt=UTF-8
encoding//target/generated-sources/localizer=ISO-8859-1
encoding/<project>=ISO-8859-1
=======
eclipse.preferences.version=1
encoding//src/main/java=ISO-8859-1
encoding//src/main/resources=ISO-8859-1
encoding//src/test/java=ISO-8859-1
encoding//src/test/resources=ISO-8859-1
encoding//src/test/resources/hudson/plugins/warnings/parser/issue7178.txt=UTF-8
encoding//target/generated-sources/localizer=ISO-8859-1
encoding/<project>=ISO-8859-1
>>>>>>> branch 'master' of https://github.com/habast/warnings-plugin.git
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -36,7 +36,7 @@
<dependency>
<groupId>org.jvnet.hudson.plugins</groupId>
<artifactId>analysis-core</artifactId>
<version>1.50</version>
<version>1.51</version>
</dependency>
<dependency>
<groupId>org.jvnet.hudson.plugins</groupId>
Expand Down
Expand Up @@ -6,6 +6,8 @@
import java.io.Reader;
import java.io.UnsupportedEncodingException;

import org.apache.commons.lang.StringEscapeUtils;

import hudson.plugins.analysis.util.model.FileAnnotation;
import hudson.plugins.analysis.util.model.Priority;

Expand Down Expand Up @@ -38,7 +40,7 @@ protected void checkWarning(final FileAnnotation annotation, final int lineNumbe
assertEquals("Wrong number of ranges detected.", 1, warning.getLineRanges().size());
assertEquals("Wrong ranges start detected.", lineNumber, warning.getLineRanges().iterator().next().getStart());
assertEquals("Wrong ranges end detected.", lineNumber, warning.getLineRanges().iterator().next().getEnd());
assertEquals("Wrong message detected.", message, warning.getMessage());
assertEquals("Wrong message detected.", StringEscapeUtils.escapeXml(message), warning.getMessage());
assertEquals("Wrong filename detected.", fileName, warning.getFileName());
}

Expand Down

0 comments on commit af19cb7

Please sign in to comment.