aboutsummaryrefslogtreecommitdiff
path: root/id/server/moa-id-commons/src/main/java/at
diff options
context:
space:
mode:
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