avoid double-escape for upload collision error

This commit is contained in:
Shish 2020-03-13 09:39:00 +00:00
parent 1597eff082
commit dede46374f

View File

@ -216,7 +216,9 @@ class UploadTheme extends Themelet
public function display_upload_error(Page $page, string $title, string $message) public function display_upload_error(Page $page, string $title, string $message)
{ {
$page->add_block(new Block($title, html_escape($message))); // this message has intentional HTML in it...
$message = strpos($message, "already has hash") ? $message : html_escape($message);
$page->add_block(new Block($title, $message));
} }
protected function build_upload_block(): string protected function build_upload_block(): string