weirdly no, images should not have classes
This commit is contained in:
parent
2fd45e0cb6
commit
5bb95256ee
|
@ -98,7 +98,6 @@ defmodule Pleroma.HTML.Scrubber.Default do
|
||||||
Meta.allow_tag_with_these_attributes(:img, [
|
Meta.allow_tag_with_these_attributes(:img, [
|
||||||
"width",
|
"width",
|
||||||
"height",
|
"height",
|
||||||
"class",
|
|
||||||
"title",
|
"title",
|
||||||
"alt"
|
"alt"
|
||||||
])
|
])
|
||||||
|
|
|
@ -16,6 +16,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.NormalizeMarkupTest do
|
||||||
this is an image: <img src="http://example.com/image.jpg"><br />
|
this is an image: <img src="http://example.com/image.jpg"><br />
|
||||||
<script>alert('hacked')</script>
|
<script>alert('hacked')</script>
|
||||||
<div class="wow no classes here">mean</div>
|
<div class="wow no classes here">mean</div>
|
||||||
|
<img class="hehe" src="somewhere" />
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@expected """
|
@expected """
|
||||||
|
@ -27,6 +28,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.NormalizeMarkupTest do
|
||||||
this is an image: <img src="http://example.com/image.jpg"/><br/>
|
this is an image: <img src="http://example.com/image.jpg"/><br/>
|
||||||
alert('hacked')
|
alert('hacked')
|
||||||
mean
|
mean
|
||||||
|
<img src="somewhere"/>
|
||||||
"""
|
"""
|
||||||
|
|
||||||
test "it filter html tags" do
|
test "it filter html tags" do
|
||||||
|
|
Loading…
Reference in a new issue