Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkwilk2011-06-09 19:35:31 +0000
committerRyan D. Brooks2011-06-09 19:35:31 +0000
commit898d9a95a050b6bb38188a998034f9e048554421 (patch)
tree7a873f9960d4be8d713944145a96990669fdc5a3 /plugins/org.eclipse.osee.framework.jdk.core
parentfd9a7a19a0eef1d3a191847a7df6ba022a9458c9 (diff)
downloadorg.eclipse.osee-898d9a95a050b6bb38188a998034f9e048554421.tar.gz
org.eclipse.osee-898d9a95a050b6bb38188a998034f9e048554421.tar.xz
org.eclipse.osee-898d9a95a050b6bb38188a998034f9e048554421.zip
refactor: Addition of removeComments() to AHTML utility class
Diffstat (limited to 'plugins/org.eclipse.osee.framework.jdk.core')
-rw-r--r--plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/AHTML.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/AHTML.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/AHTML.java
index 958844c7cf1..e4185fe2544 100644
--- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/AHTML.java
+++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/AHTML.java
@@ -62,6 +62,19 @@ public class AHTML {
return html;
}
+ /**
+ * <p>
+ * Remove (X|HT)ML like comments of form:<br/>
+ * <code>&lt;!--\\s*.*\\s*--&gt;</code><br/>
+ * </p>
+ *
+ * @param value &lt;tagA&gt;&lt;!-- Comment -->aValue&lt;/tagA&gt;
+ * @return &lt;tagA&gt;aValue&lt;/tagA&gt;
+ */
+ public static String removeComments(String value) {
+ return Strings.isValid(value) ? value.replaceAll("<!--\\s*.*\\s*-->", "") : value;
+ }
+
public static String getUrlPageHtml(String urlStr, InetSocketAddress addr) {
StringBuffer buffer = new StringBuffer();
try {

Back to the top