static string UnFormat(string theInput) { var result = new TextOutput(IsStandard); var scan = new Scanner(theInput); while (true) { scan.FindTokenPair("<", ">", ourValidTagFilter); result.Append(scan.Leader); if (scan.Body.IsEmpty) break; if (IsStandard) result.AppendTag(GetTag(scan.Body)); } return result.ToString(); }
static string UnEscape(string theInput) { var scan = new Scanner(theInput); var result = new StringBuilder(); while (true) { scan.FindTokenPair("&", ";"); result.Append(scan.Leader); if (scan.Body.Length == 0) { break; } if (scan.Body.Equals("lt")) { result.Append('<'); } else if (scan.Body.Equals("gt")) { result.Append('>'); } else if (scan.Body.Equals("amp")) { result.Append('&'); } else if (scan.Body.Equals("nbsp")) { result.Append(' '); } else if (scan.Body.Equals("quot")) { result.Append('"'); } else { result.Append('&'); result.Append(scan.Body); result.Append(';'); } } return(result.ToString()); }
static string UnFormat(string theInput) { var result = new TextOutput(IsStandard); var scan = new Scanner(theInput); while (true) { scan.FindTokenPair("<", ">", ourValidTagFilter); result.Append(scan.Leader); if (scan.Body.Length == 0) { break; } if (IsStandard) { result.AppendTag(GetTag(scan.Body)); } } return(result.ToString()); }
static string UnEscape(string theInput) { var scan = new Scanner(theInput); var result = new StringBuilder(); while (true) { scan.FindTokenPair("&", ";"); result.Append(scan.Leader); if (scan.Body.IsEmpty) break; if (scan.Body.Equals("lt")) result.Append('<'); else if (scan.Body.Equals("gt")) result.Append('>'); else if (scan.Body.Equals("amp")) result.Append('&'); else if (scan.Body.Equals("nbsp")) result.Append(' '); else if (scan.Body.Equals("quot")) result.Append('"'); else { result.Append('&'); result.Append(scan.Body); result.Append(';'); } } return result.ToString(); }
static string AddStyleSheetLink(string input) { var scanner = new Scanner(input); while (true) { scanner.FindTokenPair("<link", ">"); if (scanner.Body.IsEmpty) break; if (scanner.Body.Contains("fit.css")) return input; } return styleSheetLink + input; }