mirror of
https://github.com/russross/blackfriday.git
synced 2024-03-22 13:40:34 +08:00
parent
b54984b711
commit
b44be78459
|
@ -524,10 +524,10 @@ func TestInlineLink(t *testing.T) {
|
|||
|
||||
func TestNofollowLink(t *testing.T) {
|
||||
var tests = []string{
|
||||
"[foo](/bar/)\n",
|
||||
"<p><a href=\"/bar/\" rel=\"nofollow\">foo</a></p>\n",
|
||||
"[foo](http://bar.baz/)\n",
|
||||
"<p><a href=\"http://bar.baz/\" rel=\"nofollow\">foo</a></p>\n",
|
||||
}
|
||||
doTestsInlineParam(t, tests, 0, HTML_SAFELINK|HTML_NOFOLLOW_LINKS)
|
||||
doTestsInlineParam(t, tests, 0, HTML_SAFELINK|HTML_NOFOLLOW_LINKS|HTML_SANITIZE_OUTPUT)
|
||||
}
|
||||
|
||||
func TestSafeInlineLink(t *testing.T) {
|
||||
|
|
|
@ -26,7 +26,7 @@ func init() {
|
|||
"sub", "sup", "table", "tbody", "td", "tfoot", "th", "thead", "tr", "u",
|
||||
"ul"})
|
||||
whitelistAttrs = map[string]map[string]bool{
|
||||
"a": toSet([]string{"href", "title"}),
|
||||
"a": toSet([]string{"href", "title", "rel"}),
|
||||
"img": toSet([]string{"src", "alt", "title"}),
|
||||
}
|
||||
protocolAttrs = map[string]map[string]bool{
|
||||
|
|
Loading…
Reference in New Issue
Block a user