mirror of
https://tt-rss.org/git/tt-rss.git
synced 2024-07-05 13:20:55 +02:00
f1a9ac9b15
Somehow with the old approach, `<figure>` is rearranged into `<head>`,
and the latter is stripped by `Sanitizer::strip_harmful_tags()` (see
[1]). The issue is fixed by [2]. Here I added a test for the regression.
[1] https://community.tt-rss.org/t/unexpected-behavior-with-figure-tag/6244
[2] 67012f9dac
21 lines
432 B
PHP
21 lines
432 B
PHP
<?php
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
/** @group integration */
|
|
final class SanitizerTest extends TestCase {
|
|
public function test_sanitize_non_ascii(): void {
|
|
$this->assertEquals(
|
|
'<p>中文</p>',
|
|
Sanitizer::sanitize('<p>中文</p>')
|
|
);
|
|
}
|
|
|
|
public function test_sanitize_keep_figure(): void {
|
|
$this->assertEquals(
|
|
'<figure>Content</figure>',
|
|
Sanitizer::sanitize('<figure>Content</figure>')
|
|
);
|
|
}
|
|
}
|
|
|