Add table tags to the whitelist.

Fixing:
55cd82008e

This commit introduced a html tag whitelist which does not include any table tags (<td>,<tr>,<thead>...). Therefore even tables the markdown parser itself generated will be removed.
pull/64/head
willnix 2014-04-17 15:44:40 +00:00
parent 9c7cf8b1b7
commit c1e4996787
1 changed files with 8 additions and 1 deletions

View File

@ -69,7 +69,14 @@ var (
"sub",
"strong",
"strike",
"ul",
"ul",
"table",
"tr",
"td",
"th",
"thead",
"tbody",
}
urlRe = `((https?|ftp):\/\/|\/)[-A-Za-z0-9+&@#\/%?=~_|!:,.;\(\)]+`
tagWhitelist = regexp.MustCompile(`^(<\/?(` + strings.Join(tags, "|") + `)>|<(br|hr)\s?\/?>)$`)