public static string removeComments(string strString) { string text = ""; string text2 = ""; StringParser stringParser = new StringParser(strString); while (stringParser.extractTo("<!--", ref text2)) { text += text2; if (!stringParser.skipToEndOf("-->")) { return(strString); } } stringParser.extractToEnd(ref text2); return(text + text2); }
public static string removeScripts(string strString) { string text = ""; string text2 = ""; StringParser stringParser = new StringParser(strString); while (stringParser.extractToNoCase("<script", ref text2)) { text += text2; if (!stringParser.skipToEndOfNoCase("</script>")) { stringParser.Content = text; return(strString); } } stringParser.extractToEnd(ref text2); return(text + text2); }
public static string removeScripts(string strString) { string text = ""; string text2 = ""; StringParser stringParser = new StringParser(strString); while (stringParser.extractToNoCase("<script", ref text2)) { text += text2; if (!stringParser.skipToEndOfNoCase("</script>")) { stringParser.Content = text; return strString; } } stringParser.extractToEnd(ref text2); return text + text2; }
public static string removeComments(string strString) { string text = ""; string text2 = ""; StringParser stringParser = new StringParser(strString); while (stringParser.extractTo("<!--", ref text2)) { text += text2; if (!stringParser.skipToEndOf("-->")) { return strString; } } stringParser.extractToEnd(ref text2); return text + text2; }