mirror of https://github.com/zulip/zulip.git
postprocess_content: Un-URI-escape filename in title.
The filename contains URI-escaped characters, which do not need to be escaped for safety -- they only make the filename in the tooltip less readable.
This commit is contained in:
parent
6c1a8185aa
commit
b8e4bdccd8
|
@ -75,7 +75,11 @@ export function postprocess_content(html: string): string {
|
|||
// not display the URL like it does in the web app.
|
||||
title = legacy_title = $t(
|
||||
{defaultMessage: "Download {filename}"},
|
||||
{filename: url.pathname.slice(url.pathname.lastIndexOf("/") + 1)},
|
||||
{
|
||||
filename: decodeURIComponent(
|
||||
url.pathname.slice(url.pathname.lastIndexOf("/") + 1),
|
||||
),
|
||||
},
|
||||
);
|
||||
} else {
|
||||
title = url.toString();
|
||||
|
|
Loading…
Reference in New Issue