summaryrefslogtreecommitdiff
path: root/src/lq/Strings.java
diff options
context:
space:
mode:
authorKjetil Ørbekk <orbekk@pvv.ntnu.no>2010-09-03 01:13:15 -0400
committerKjetil Ørbekk <orbekk@pvv.ntnu.no>2010-09-03 01:13:15 -0400
commit1fb83a8c3edefbc2a43d26cc6db835e592d65934 (patch)
tree73047a16e263ae3f84031bc2d82e3961d2140430 /src/lq/Strings.java
parentb2dd8bf148b70c3076625840f908b5c7d32e9ee1 (diff)
Quote listing
Ported the quotes.jsp page from the old quote system. This commit contains some utility classes related to this. DropData is a temporary hack to remove all data in the datastore. TODO: Remove this when we are finished migrating the application.
Diffstat (limited to 'src/lq/Strings.java')
-rw-r--r--src/lq/Strings.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lq/Strings.java b/src/lq/Strings.java
new file mode 100644
index 0000000..f3604f0
--- /dev/null
+++ b/src/lq/Strings.java
@@ -0,0 +1,12 @@
+package lq;
+
+public class Strings {
+ public static final String escape(String raw) {
+ return raw
+ .replaceAll("&","&amp;")
+ .replaceAll("<","&lt;")
+ .replaceAll(">","&gt;")
+ .replaceAll(" ","&nbsp;&nbsp;");
+
+ }
+}