From 12792e74f71a57448277dda46471563a7fea71db Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Mon, 31 Mar 2025 21:50:07 +0700 Subject: [PATCH] fix: Fixed TorrentPier build-in emojis showing in ACP (#1870) --- src/Legacy/BBCode.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Legacy/BBCode.php b/src/Legacy/BBCode.php index b191e8f51..642ccfc5b 100644 --- a/src/Legacy/BBCode.php +++ b/src/Legacy/BBCode.php @@ -341,6 +341,12 @@ class BBCode $this->smilies = $datastore->get('smile_replacements'); } + if (defined('IN_ADMIN')) { + foreach ($this->smilies['repl'] as &$smile) { + $smile = preg_replace('/src="([^"]+)"/', 'src="./../$1"', $smile); + } + } + if ($this->smilies) { /** @noinspection NestedPositiveIfStatementsInspection */ if ($parsed_text = preg_replace($this->smilies['orig'], $this->smilies['repl'], $text)) {