Remove newlines and modifiers from thread title

Parts sampled from NPFchan
This commit is contained in:
discomrade 2021-09-28 03:09:18 +00:00
parent 9c7239f2d4
commit 46d62584d0
3 changed files with 18 additions and 1 deletions

View file

@ -1914,6 +1914,10 @@ function unicodify($body) {
return $body;
}
function newline_to_full_stop($body) {
return str_replace("\n", '. ', $body);
}
function extract_modifiers($body) {
$modifiers = array();
@ -1928,6 +1932,17 @@ function extract_modifiers($body) {
return $modifiers;
}
function remove_markup($body) {
global $config;
foreach ($config['markup'] as $markup) {
if (is_string($markup[1]))
$body = preg_replace($markup[0], "$1", $body);
}
return $body;
}
function remove_modifiers($body) {
return preg_replace('@<tinyboard ([\w\s]+)>(.+?)</tinyboard>@usm', '', $body);
}