public virtual void TestQuoting() { Assert.Equal("ab<cd", HtmlQuoting.QuoteHtmlChars("ab<cd")); Assert.Equal("ab>", HtmlQuoting.QuoteHtmlChars("ab>")); Assert.Equal("&&&", HtmlQuoting.QuoteHtmlChars("&&&" )); Assert.Equal(" '\n", HtmlQuoting.QuoteHtmlChars(" '\n")); Assert.Equal(""", HtmlQuoting.QuoteHtmlChars("\"")); Assert.Equal(null, HtmlQuoting.QuoteHtmlChars(null)); }
/// <exception cref="System.Exception"/> private void RunRoundTrip(string str) { Assert.Equal(str, HtmlQuoting.UnquoteHtmlChars(HtmlQuoting.QuoteHtmlChars (str))); }
/// <exception cref="System.IO.IOException"/> public override void Write(int b) { this.data[0] = unchecked ((byte)b); HtmlQuoting.QuoteHtmlChars(@out, this.data, 0, 1); }
/// <exception cref="System.IO.IOException"/> public override void Write(byte[] data, int off, int len) { HtmlQuoting.QuoteHtmlChars(@out, data, off, len); }