aboutsummaryrefslogtreecommitdiff
path: root/id/server/moa-id-commons/src/main
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2017-11-27 15:33:37 +0100
committerThomas Lenz <tlenz@iaik.tugraz.at>2017-11-27 15:33:37 +0100
commite392f06a8e1920e4404f11f74c8f51795ad590a6 (patch)
tree74d06da7d89582d1448cbb0a3c0c8d1858318b06 /id/server/moa-id-commons/src/main
parent813e08137530dba321db7807bd1bb5a53af80541 (diff)
downloadmoa-id-spss-e392f06a8e1920e4404f11f74c8f51795ad590a6.tar.gz
moa-id-spss-e392f06a8e1920e4404f11f74c8f51795ad590a6.tar.bz2
moa-id-spss-e392f06a8e1920e4404f11f74c8f51795ad590a6.zip
add some more escaptions
Diffstat (limited to 'id/server/moa-id-commons/src/main')
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/logging/Logger.java5
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/util/FileUtils.java35
2 files changed, 5 insertions, 35 deletions
diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/logging/Logger.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/logging/Logger.java
index 3730b36ce..9152f2549 100644
--- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/logging/Logger.java
+++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/logging/Logger.java
@@ -27,6 +27,9 @@ package at.gv.egovernment.moa.logging;
import java.util.HashMap;
import java.util.Map;
+import org.apache.commons.lang3.StringEscapeUtils;
+
+
/**
* A utility class acting as a facade to the logging subsystem.
*
@@ -88,7 +91,7 @@ public class Logger {
private static String prepareMessage(Object message) {
if(null == message)
return "no message given";
- return message.toString();
+ return StringEscapeUtils.escapeHtml4(message.toString());
}
/**
diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/util/FileUtils.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/util/FileUtils.java
index 3291f8a15..8d6aea164 100644
--- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/util/FileUtils.java
+++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/util/FileUtils.java
@@ -53,40 +53,7 @@ public class FileUtils {
in.close();
return content;
}
-// /**
-// * Reads a file, given by URL, into a String.
-// * @param urlString file URL
-// * @param encoding character encoding
-// * @return file content
-// * @throws IOException on any exception thrown
-// */
-// public static String readURL(String urlString, String encoding) throws IOException {
-// byte[] content = readURL(urlString);
-// return new String(content, encoding);
-// }
-// /**
-// * Reads a file, given by filename, into a byte array.
-// * @param filename filename
-// * @return file content
-// * @throws IOException on any exception thrown
-// */
-// public static byte[] readFile(String filename) throws IOException {
-// BufferedInputStream in = new BufferedInputStream(new FileInputStream(filename));
-// byte[] content = StreamUtils.readStream(in);
-// in.close();
-// return content;
-// }
-// /**
-// * Reads a file, given by filename, into a String.
-// * @param filename filename
-// * @param encoding character encoding
-// * @return file content
-// * @throws IOException on any exception thrown
-// */
-// public static String readFile(String filename, String encoding) throws IOException {
-// byte[] content = readFile(filename);
-// return new String(content, encoding);
-// }
+
/**
* Reads a file from a resource.
* @param name resource name