mirror of
https://git.tt-rss.org/fox/tt-rss.git
synced 2025-08-05 13:47:25 +02:00
Escape error content displayed when subscribing fails (as it might contain HTML).
This commit is contained in:
parent
ef1f3cbcef
commit
5b0d325733
@ -1035,7 +1035,7 @@ class Feeds extends Handler_Protected {
|
||||
UrlHelper::$fetch_last_error .= " (feed behind Cloudflare)";
|
||||
}
|
||||
|
||||
return array("code" => 5, "message" => UrlHelper::$fetch_last_error);
|
||||
return array("code" => 5, "message" => truncate_string(UrlHelper::$fetch_last_error, 1000, '…'));
|
||||
}
|
||||
|
||||
if (str_contains(UrlHelper::$fetch_last_content_type, "html") && self::_is_html($contents)) {
|
||||
|
@ -195,7 +195,7 @@ const CommonDialogs = {
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
dialog.show_error(__("Couldn't download the specified URL: %s").replace("%s", rc['message']));
|
||||
dialog.show_error(__("Couldn't download the specified URL: %s").replace("%s", App.escapeHtml(rc['message'])));
|
||||
break;
|
||||
case 6:
|
||||
dialog.show_error(__("XML validation failed: %s").replace("%s", rc['message']));
|
||||
|
Loading…
Reference in New Issue
Block a user