html: allow inline images by default (because of custom emoji)
This commit is contained in:
parent
40e2f6e500
commit
358f88e10a
2 changed files with 18 additions and 1 deletions
|
|
@ -37,6 +37,21 @@ defmodule Pleroma.HTML.Scrubber.TwitterText do
|
|||
|
||||
# microformats
|
||||
Meta.allow_tag_with_these_attributes("span", [])
|
||||
|
||||
# allow inline images for custom emoji
|
||||
@markup Application.get_env(:pleroma, :markup)
|
||||
@allow_inline_images Keyword.get(@markup, :allow_inline_images)
|
||||
|
||||
if @allow_inline_images do
|
||||
Meta.allow_tag_with_uri_attributes("img", ["src"], @valid_schemes)
|
||||
|
||||
Meta.allow_tag_with_these_attributes("img", [
|
||||
"width",
|
||||
"height",
|
||||
"title",
|
||||
"alt"
|
||||
])
|
||||
end
|
||||
end
|
||||
|
||||
defmodule Pleroma.HTML.Scrubber.Default do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue