mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-24 07:30:10 +01:00
facilitate using markup modifiers multiple times; make raw html not consume the whole post
This commit is contained in:
parent
fa5922b45e
commit
e7dd0bbc4a
@ -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>';
|
||||
|
Loading…
Reference in New Issue
Block a user