diff options
Diffstat (limited to 'helpers/content.go')
-rw-r--r-- | helpers/content.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/helpers/content.go b/helpers/content.go index 4a46ecb77..1c0a7b7e9 100644 --- a/helpers/content.go +++ b/helpers/content.go @@ -109,6 +109,7 @@ type BlackFriday struct { Fractions bool HrefTargetBlank bool NofollowLinks bool + NoreferrerLinks bool SmartDashes bool LatexDashes bool TaskLists bool @@ -126,6 +127,7 @@ func newBlackfriday(config map[string]interface{}) *BlackFriday { "fractions": true, "hrefTargetBlank": false, "nofollowLinks": false, + "noreferrerLinks": false, "smartDashes": true, "latexDashes": true, "plainIDAnchors": true, @@ -283,6 +285,10 @@ func (c *ContentSpec) getHTMLRenderer(defaultFlags int, ctx *RenderingContext) b htmlFlags |= blackfriday.HTML_NOFOLLOW_LINKS } + if ctx.Config.NoreferrerLinks { + htmlFlags |= blackfriday.HTML_NOREFERRER_LINKS + } + if ctx.Config.SmartDashes { htmlFlags |= blackfriday.HTML_SMARTYPANTS_DASHES } |