Disable inline images
This commit is contained in:
parent
13c61e59e7
commit
6d4f99d9b3
3 changed files with 5 additions and 4 deletions
|
@ -274,9 +274,7 @@
|
|||
}
|
||||
|
||||
config :pleroma, :markup,
|
||||
# XXX - unfortunately, inline images must be enabled by default right now, because
|
||||
# of custom emoji. Issue #275 discusses defanging that somehow.
|
||||
allow_inline_images: true,
|
||||
allow_inline_images: false,
|
||||
allow_headings: false,
|
||||
allow_tables: false,
|
||||
allow_fonts: false,
|
||||
|
|
|
@ -79,7 +79,6 @@ defmodule Pleroma.HTML.Scrubber.Default do
|
|||
Meta.allow_tag_with_these_attributes(:img, [
|
||||
"width",
|
||||
"height",
|
||||
"class",
|
||||
"title",
|
||||
"alt"
|
||||
])
|
||||
|
|
|
@ -15,6 +15,8 @@ defmodule Pleroma.Web.ActivityPub.MRF.NormalizeMarkupTest do
|
|||
this is a link with not allowed "rel" attribute: <a href="http://example.com/" rel="tag noallowed">example.com</a>
|
||||
this is an image: <img src="http://example.com/image.jpg"><br />
|
||||
<script>alert('hacked')</script>
|
||||
<div class="wow no classes here">mean</div>
|
||||
<img class="hehe" src="somewhere" />
|
||||
"""
|
||||
|
||||
@expected """
|
||||
|
@ -25,6 +27,8 @@ defmodule Pleroma.Web.ActivityPub.MRF.NormalizeMarkupTest do
|
|||
this is a link with not allowed "rel" attribute: <a href="http://example.com/">example.com</a>
|
||||
this is an image: <img src="http://example.com/image.jpg"/><br/>
|
||||
alert('hacked')
|
||||
mean
|
||||
<img src="somewhere"/>
|
||||
"""
|
||||
|
||||
test "it filter html tags" do
|
||||
|
|
Loading…
Reference in a new issue