aboutsummaryrefslogtreecommitdiff
path: root/id/server/moa-id-commons/src/main/java/at
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:45:37 +0100
commitf6ef9b2e21af5a55b9f2b360de3cff38c56904d6 (patch)
tree71c3e2dcdade53d820655a9b5f1aa1b451278f5f /id/server/moa-id-commons/src/main/java/at
parent75c7ab602fe14d56217f268ea80e787a5316288a (diff)
downloadmoa-id-spss-f6ef9b2e21af5a55b9f2b360de3cff38c56904d6.tar.gz
moa-id-spss-f6ef9b2e21af5a55b9f2b360de3cff38c56904d6.tar.bz2
moa-id-spss-f6ef9b2e21af5a55b9f2b360de3cff38c56904d6.zip
add some more escaptions
Diffstat (limited to 'id/server/moa-id-commons/src/main/java/at')
-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