Example #1
0
        /// <summary>
        /// Encodes the given text with HTML encoding (ampersand-encoding) and writes the result to the target writer.
        /// </summary>
        protected void WriteEncodedHtml(string text)
        {
            if (text is null)
            {
                return;
            }

            HtmlFormatterSlim.EscapeHtml(new StringPart(text, 0, text.Length), _target);
        }
Example #2
0
        /// <summary>
        /// Encodes the given text with HTML encoding (ampersand-encoding) and writes the result to the target writer.
        /// </summary>
        protected void WriteEncodedHtml(StringContent text)
        {
            if (text is null)
            {
                return;
            }

            HtmlFormatterSlim.EscapeHtml(text, _target);
        }
Example #3
0
 private void WriteEncodedHtml(StringPart text)
 {
     HtmlFormatterSlim.EscapeHtml(text, _target);
 }