diff options
author | kwilk | 2011-06-09 19:35:31 +0000 |
---|---|---|
committer | Ryan D. Brooks | 2011-06-09 19:35:31 +0000 |
commit | 898d9a95a050b6bb38188a998034f9e048554421 (patch) | |
tree | 7a873f9960d4be8d713944145a96990669fdc5a3 /plugins/org.eclipse.osee.framework.jdk.core | |
parent | fd9a7a19a0eef1d3a191847a7df6ba022a9458c9 (diff) | |
download | org.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.java | 13 |
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><!--\\s*.*\\s*--></code><br/> + * </p> + * + * @param value <tagA><!-- Comment -->aValue</tagA> + * @return <tagA>aValue</tagA> + */ + 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 { |