Skip to content

Commit

Permalink
Allowing class atts in safe mode for a & img tags.
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Jun 18, 2012
1 parent a5b94d5 commit 3104ac5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions MarkdownDeep/HtmlTag.cs
Expand Up @@ -88,8 +88,8 @@ public HtmlTagFlags Flags
};

static Dictionary<string, string[]> m_allowed_attributes = new Dictionary<string, string[]>() {
{ "a", new string[] { "href", "title"} },
{ "img", new string[] { "src", "width", "height", "alt", "title" } },
{ "a", new string[] { "href", "title", "class" } },
{ "img", new string[] { "src", "width", "height", "alt", "title", "class" } },
};

static Dictionary<string, HtmlTagFlags> m_tag_flags = new Dictionary<string, HtmlTagFlags>() {
Expand Down
4 changes: 2 additions & 2 deletions MarkdownDeepJS/MarkdownDeep.js
Expand Up @@ -1350,8 +1350,8 @@ var MarkdownDeep = new function () {
};

var allowed_attributes = {
"a": { "href": 1, "title": 1 },
"img": { "src": 1, "width": 1, "height": 1, "alt": 1, "title": 1 }
"a": { "href": 1, "title": 1, "class": 1 },
"img": { "src": 1, "width": 1, "height": 1, "alt": 1, "title": 1, "class": 1 }
};

var b = HtmlTagFlags_Block;
Expand Down

0 comments on commit 3104ac5

Please sign in to comment.