diff options
| author | czaks <marcin@6irc.net> | 2013-07-31 20:11:11 -0400 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2013-07-31 20:11:11 -0400 |
| commit | e7dd0bbc4a4a17a4f7e5f6750b48ee3c0946c40e (patch) | |
| tree | 594ed995717afd5c101b9631b68c7757af18d68e /inc | |
| parent | fa5922b45efec1c0e334706ab5bccedb1856572b (diff) | |
facilitate using markup modifiers multiple times; make raw html not consume the whole post
Diffstat (limited to 'inc')
| -rw-r--r-- | inc/functions.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/inc/functions.php b/inc/functions.php index 1f702ba0..5dace908 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -1451,7 +1451,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; @@ -1468,8 +1468,7 @@ function markup(&$body, $track_cites = false) { // Public ban message $replacement = sprintf($config['mod']['ban_message'], $modifier['content']); } elseif ($modifier['type'] == 'raw html') { - $body = html_entity_decode($modifier['content']); - return array(); + $replacement = html_entity_decode($modifier['content']); } elseif (preg_match('/^escape /', $modifier['type'])) { // Escaped (not a real modifier) $replacement = '<tinyboard ' . substr($modifier['type'], strlen('escape ')) . '>' . $modifier['content'] . '</tinyboard>'; |
