diff options
author | kaniini <nenolod@gmail.com> | 2019-03-18 00:38:09 +0000 |
---|---|---|
committer | kaniini <nenolod@gmail.com> | 2019-03-18 00:38:09 +0000 |
commit | 1344e34ed3a337b54e450af474f81e2f326bf768 (patch) | |
tree | 56b06a4c41d008de4daed33f6119a66a059d3691 /lib/pleroma | |
parent | 6d6f48d0795cc12d3c5aca5d90ae51b10086996d (diff) | |
parent | 4ed2618f6c732ba1009510f5698a5d981a151925 (diff) | |
download | pleroma-1344e34ed3a337b54e450af474f81e2f326bf768.tar.gz |
Merge branch 'feature/allow-link-rel-attribute' into 'develop'
Allow 'rel' attribute on `<a>` link with specific values (for hashtag recognition).
See merge request pleroma/pleroma!946
Diffstat (limited to 'lib/pleroma')
-rw-r--r-- | lib/pleroma/html.ex | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/pleroma/html.ex b/lib/pleroma/html.ex index 05253157e..5b152d926 100644 --- a/lib/pleroma/html.ex +++ b/lib/pleroma/html.ex @@ -95,6 +95,13 @@ defmodule Pleroma.HTML.Scrubber.TwitterText do Meta.allow_tag_with_uri_attributes("a", ["href", "data-user", "data-tag"], @valid_schemes) Meta.allow_tag_with_these_attributes("a", ["name", "title", "class"]) + Meta.allow_tag_with_this_attribute_values("a", "rel", [ + "tag", + "nofollow", + "noopener", + "noreferrer" + ]) + # paragraphs and linebreaks Meta.allow_tag_with_these_attributes("br", []) Meta.allow_tag_with_these_attributes("p", []) @@ -137,6 +144,13 @@ defmodule Pleroma.HTML.Scrubber.Default do Meta.allow_tag_with_uri_attributes("a", ["href", "data-user", "data-tag"], @valid_schemes) Meta.allow_tag_with_these_attributes("a", ["name", "title", "class"]) + Meta.allow_tag_with_this_attribute_values("a", "rel", [ + "tag", + "nofollow", + "noopener", + "noreferrer" + ]) + Meta.allow_tag_with_these_attributes("abbr", ["title"]) Meta.allow_tag_with_these_attributes("b", []) |