HtmlTags/htmltags

KeyNotFoundException when using canvas tags new HtmlTag("canvas").ToString()

Closed this issue · 0 comments

The following throws a KeyNotFoundException even though "canvas" is a legit tag:

new HtmlTag("canvas").ToString()

Stack:

[KeyNotFoundException: The given key was not present in the dictionary.]
   System.ThrowHelper.ThrowKeyNotFoundException() +36
   System.Collections.Generic.Dictionary`2.get_Item(TKey key) +51
   HtmlTags.HtmlTextWriter.GetTagKey(String tagName) +126
   HtmlTags.HtmlTextWriter.set_TagName(String value) +92
   HtmlTags.HtmlTextWriter.RenderBeginTag(String tagName) +45
   HtmlTags.HtmlTag.WriteBeginTag(HtmlTextWriter html) +870
   HtmlTags.HtmlTag.WriteHtml(HtmlTextWriter html) +84
   HtmlTags.<>c__DisplayClass78_0.<WriteContent>b__0(HtmlTag x) +58
   HtmlTags.SharedExtensions.Each(IEnumerable`1 enumerable, Action`1 action) +269
   HtmlTags.HtmlTag.WriteContent(HtmlTextWriter html) +288
   HtmlTags.HtmlTag.WriteHtml(HtmlTextWriter html) +97
   HtmlTags.HtmlTag.ToString(HtmlTextWriter html) +110
   HtmlTags.HtmlTag.ToString() +209
   ...