all repos — grayfriday @ 93484b1424ae21ae8bef25778033d4a89bd4dba9

blackfriday fork with a few changes

add nofollow ref for non internal links only
gihnius gihnius@gmail.com
Fri, 21 Mar 2014 11:14:58 +0800
commit

93484b1424ae21ae8bef25778033d4a89bd4dba9

parent

ecf59d4a55448e1cfbc558e09a83a422e0167228

1 files changed, 2 insertions(+), 2 deletions(-)

jump to
M html.gohtml.go

@@ -415,7 +415,7 @@ out.WriteString("mailto:")

} attrEscape(out, link) - if options.flags&HTML_NOFOLLOW_LINKS != 0 { + if options.flags&HTML_NOFOLLOW_LINKS != 0 && !isRelativeLink(link) { out.WriteString("\" rel=\"nofollow") } // blank target only add to external link

@@ -510,7 +510,7 @@ if len(title) > 0 {

out.WriteString("\" title=\"") attrEscape(out, title) } - if options.flags&HTML_NOFOLLOW_LINKS != 0 { + if options.flags&HTML_NOFOLLOW_LINKS != 0 && !isRelativeLink(link) { out.WriteString("\" rel=\"nofollow") } // blank target only add to external link