From 138dbbc8a5780bd5ec8bcf5d7f47debdaa8fc22e Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Mon, 20 Mar 2023 21:01:30 +0100 Subject: [PATCH] Game/Text * try to catch more html-like constructs in text blobs and escape them * ...! --- includes/utilities.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/utilities.php b/includes/utilities.php index 1f7f75cf..ab43276c 100644 --- a/includes/utilities.php +++ b/includes/utilities.php @@ -707,6 +707,9 @@ abstract class Util else $text = strtr($text, ["\n" => $markdown ? '[br]' : '
', "\r" => '']); + // escape fake html-ish tags the browser skipsh dishplaying ...! + $text = preg_replace('/<([^\s\/]+)>/iu', '<\1>', $text); + $from = array( '/\|T([\w]+\\\)*([^\.]+)\.blp:\d+\|t/ui', // images (force size to tiny) |T:|t '/\|c(\w{6})\w{2}([^\|]+)\|r/ui', // color |c|r