/// <summary> /// Decodes an HTML-encoded string and sends the resulting output to a TextWriter output stream. /// </summary> /// <param name="s">The HTML string to decode</param> /// <param name="output">The TextWriter output stream containing the decoded string. </param> public static void HtmlDecode(string s, TextWriter output) { if (output == null) { throw new NullReferenceException(".NET emulation"); } if (!string.IsNullOrEmpty(s)) { output.Write(HttpEncoder.HtmlDecode(s)); } }
/// <summary> /// Decodes an HTML-encoded string and returns the decoded string. /// </summary> /// <param name="s">The HTML string to decode. </param> /// <returns>The decoded text.</returns> public static string HtmlDecode(string s) { return(HttpEncoder.HtmlDecode(s)); }