Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 3
0
 private void WriteEncodedHtml(StringPart text)
 {
     HtmlFormatterSlim.EscapeHtml(text, _target);
 }