diff options
author | Klaus Weidenbach <Klaus.Weidenbach@gmx.net> | 2017-03-18 17:50:05 +0100 |
---|---|---|
committer | Klaus Weidenbach <Klaus.Weidenbach@gmx.net> | 2017-03-26 00:41:27 +0100 |
commit | f718e2b0db0fe3477212a8dd6c3ec067f4432862 (patch) | |
tree | 8dfbd3b3d4bdcd967b50f1ee4655440bcdef5bb8 /tests/unit/includes | |
parent | 2115eb26a7fd2ca937286bd4e98ab74c7d6e9525 (diff) | |
download | volse-hubzilla-f718e2b0db0fe3477212a8dd6c3ec067f4432862.tar.gz volse-hubzilla-f718e2b0db0fe3477212a8dd6c3ec067f4432862.tar.bz2 volse-hubzilla-f718e2b0db0fe3477212a8dd6c3ec067f4432862.zip |
:arrow_up: Update HTML Purifier library.
Updated HTML Purifier from 4.6.0 to 4.9.2 with better PHP7 compatibility.
Used composer to manage this library.
Diffstat (limited to 'tests/unit/includes')
-rw-r--r-- | tests/unit/includes/TextTest.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/unit/includes/TextTest.php b/tests/unit/includes/TextTest.php index 85ed6a4fd..e2c7cbb9a 100644 --- a/tests/unit/includes/TextTest.php +++ b/tests/unit/includes/TextTest.php @@ -36,6 +36,10 @@ empty line above'; $this->assertEquals($html5elements, purify_html($html5elements)); $this->assertEquals('<button>button label</button>', purify_html('<button>button label</button>')); + // unsupported HTML5 elements + $this->assertEquals('Your HTML parser does not support HTML5 video.', purify_html('<video controls><source src="movie.ogg" type="video/ogg">Your HTML parser does not support HTML5 video.</video>')); + $this->assertEquals('Your HTML parser does not support HTML5 audio.', purify_html('<audio controls><source src="movie.ogg" "type="audio/ogg">Your HTML parser does not support HTML5 audio.</audio>')); + // preserve f6 and bootstrap additional data attributes from our own configuration $this->assertEquals('<div data-title="title">text</div>', purify_html('<div data-title="title">text</div>')); $this->assertEquals('<ul data-accordion-menu=""><li>item1</li></ul>', purify_html('<ul data-accordion-menu><li>item1</li></ul>')); @@ -51,6 +55,8 @@ empty line above'; $this->assertEquals('<a href="#">link with rel="nofollow"</a>', purify_html('<a href="#" rel="nofollow">link with rel="nofollow"</a>')); $this->assertEquals('a b', purify_html('a b')); $this->assertEquals('ä ä € €', purify_html('ä ä € €')); + $this->assertEquals('<img src="picture.png" alt="text" />', purify_html('<img src="picture.png" alt="text">')); + $this->assertEquals('', purify_html('<iframe width="560" height="315" src="https://www.youtube.com/embed/kiNGx5oL7hk" frameborder="0" allowfullscreen></iframe>')); } public function testPurifyHTML_js() { |