diff options
author | Mario <mario@mariovavti.com> | 2025-04-23 19:37:57 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2025-04-23 19:37:57 +0000 |
commit | d5f7b620c407bd1a9280ba0903d2f059d06a5c89 (patch) | |
tree | 2530c9b4503b842adde371556ba575c35ac04440 | |
parent | 6515443957edc905013dd8c76a8468404f5e6d3f (diff) | |
download | volse-hubzilla-d5f7b620c407bd1a9280ba0903d2f059d06a5c89.tar.gz volse-hubzilla-d5f7b620c407bd1a9280ba0903d2f059d06a5c89.tar.bz2 volse-hubzilla-d5f7b620c407bd1a9280ba0903d2f059d06a5c89.zip |
fix regex to catch codeblocks with params like class etc
-rw-r--r-- | include/text.php | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/text.php b/include/text.php index 4297174b2..79441418c 100644 --- a/include/text.php +++ b/include/text.php @@ -1425,11 +1425,10 @@ function smilies($s, $sample = false, $terms = []) { || (local_channel() && intval(get_pconfig(local_channel(), 'system', 'no_smilies')))) return $s; - $s = preg_replace_callback('{<(pre|code)>.*?</\1>}ism', 'smile_shield', $s); + $s = preg_replace_callback('/<(pre|code)\b[^>]*>.*?<\/(pre|code)>/ism', 'smile_shield', $s); $s = preg_replace_callback('/<[a-z]+ .*?>/ism', 'smile_shield', $s); if (preg_match_all('/(\:(\w|\+|\-)+\:)(?=|[\!\.\?]|$)/', $s, $match)) { - // emoji shortcodes $emojis = get_emojis(); foreach ($match[0] as $mtch) { |