mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-11-15 14:02:32 +00:00
[chore] Fix rel="nofollow" so that it only applies to external links (#991)
Resolves https://github.com/superseriousbusiness/gotosocial/issues/990
This commit is contained in:
parent
076680a199
commit
53a1e47791
1 changed files with 2 additions and 1 deletions
|
@ -33,7 +33,8 @@ import (
|
||||||
// Source: https://github.com/microcosm-cc/bluemonday#usage
|
// Source: https://github.com/microcosm-cc/bluemonday#usage
|
||||||
var regular *bluemonday.Policy = bluemonday.UGCPolicy().
|
var regular *bluemonday.Policy = bluemonday.UGCPolicy().
|
||||||
RequireNoReferrerOnLinks(true).
|
RequireNoReferrerOnLinks(true).
|
||||||
RequireNoFollowOnLinks(true).
|
RequireNoFollowOnLinks(false). // remove the global default which adds rel="nofollow" to all links including local relative
|
||||||
|
RequireNoFollowOnFullyQualifiedLinks(true). // add rel="nofollow" on all external links
|
||||||
RequireCrossOriginAnonymous(true).
|
RequireCrossOriginAnonymous(true).
|
||||||
AddTargetBlankToFullyQualifiedLinks(true).
|
AddTargetBlankToFullyQualifiedLinks(true).
|
||||||
AllowAttrs("class", "href", "rel").OnElements("a").
|
AllowAttrs("class", "href", "rel").OnElements("a").
|
||||||
|
|
Loading…
Reference in a new issue