diff options
| author | Michael Foster <savetheinternet@tinyboard.org> | 2013-07-31 21:24:17 -0400 |
|---|---|---|
| committer | Michael Foster <savetheinternet@tinyboard.org> | 2013-07-31 21:24:17 -0400 |
| commit | ea2b8cce077a092e0cbf136f9a45158668cc5ecf (patch) | |
| tree | 13a8ecffd00d47ec68e57cda190fb7342fb1ac58 /inc/functions.php | |
| parent | a5312ebe897036e89db57480abb0ae617a2bcb38 (diff) | |
Bugfix: HTML injection in post editing (introduces and fixes yet another bug)
Diffstat (limited to 'inc/functions.php')
| -rw-r--r-- | inc/functions.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/functions.php b/inc/functions.php index b40b40d2..9e1ce1fa 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -1420,7 +1420,7 @@ function markup(&$body, $track_cites = false) { $body = str_replace("\r", '', $body); $body = utf8tohtml($body); - if (preg_match_all('@<tinyboard ([\w\s]+)>(.+)</tinyboard>@um', $body, $modifiers, PREG_SET_ORDER | PREG_OFFSET_CAPTURE)) { + if (preg_match_all('@<tinyboard ([\w\s]+)>(.+?)</tinyboard>@um', $body, $modifiers, PREG_SET_ORDER | PREG_OFFSET_CAPTURE)) { $skip_chars = 0; $body_tmp = $body; $end_markup = false; @@ -1436,7 +1436,7 @@ function markup(&$body, $track_cites = false) { if ($modifier['type'] == 'ban message') { // Public ban message - $replacement = sprintf($config['mod']['ban_message'], $modifier['content']); + $replacement = sprintf($config['mod']['ban_message'], html_entity_decode($modifier['content'])); if ($end_markup) { $body .= $replacement; } |
