Exemple #1
0
 public void Html(StringBuilder accum, OutputSettings output)
 {
     accum.Append(Key)
     .Append("=\"")
     .Append(Entities.Escape(Value, output))
     .Append("\"");
 }
Exemple #2
0
        public override void OuterHtmlHead(StringBuilder accum, int depth, OutputSettings output)
        {
            string html = Entities.Escape(GetWholeText(), output);

            if (output.PrettyPrint() && ParentNode is Element && !((Element)ParentNode).PreserveWhitespace)
            {
                html = NormaliseWhitespace(html);
            }

            if (output.PrettyPrint() && SiblingIndex == 0 && ParentNode is Element && ((Element)ParentNode).Tag.FormatAsBlock && !IsBlank)
            {
                Indent(accum, depth, output);
            }
            accum.Append(html);
        }
Exemple #3
0
 /// <summary>
 /// Get the HTML representation of this attribute; e.g. <code>href="index.html"</code>
 /// </summary>
 public string Html()
 {
     return(string.Format("{0}=\"{1}\"", _key, Entities.Escape(_value, (new Document(string.Empty).OutputSettings()))));
 }