mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 06:55:19 +00:00
escape brackets in alt tags from remote sources.
This commit is contained in:
parent
3518f5f2de
commit
4780df8a63
1 changed files with 1 additions and 0 deletions
|
@ -4049,6 +4049,7 @@ class Activity
|
|||
if (self::media_not_in_body($a['href'], $item['body'])) {
|
||||
if (isset($a['name']) && $a['name']) {
|
||||
$alt = htmlspecialchars($a['name'], ENT_QUOTES);
|
||||
$alt = str_replace(['[', ']'], ['%5b', '%5d'], $alt);
|
||||
$item['body'] .= "\n\n" . '[img alt="' . $alt . '"]' . $a['href'] . '[/img]';
|
||||
} else {
|
||||
$item['body'] .= "\n\n" . '[img]' . $a['href'] . '[/img]';
|
||||
|
|
Loading…
Reference in a new issue