summaryrefslogtreecommitdiff
path: root/inc/functions.php
diff options
context:
space:
mode:
authorczaks <marcin@6irc.net>2015-03-30 06:26:53 +0200
committerczaks <marcin@6irc.net>2015-03-30 06:26:53 +0200
commit5d8e023fc4ba7692eb81bf690c8a04dac9d561ee (patch)
tree5dc46853a3ff0940338bb9babeeee4b8623770ab /inc/functions.php
parent10f93d0d4367ade293c7a8733989cedcd7ca791a (diff)
remove tinyboard special markup from slugs; thanks stigma for reporting
Diffstat (limited to 'inc/functions.php')
-rwxr-xr-xinc/functions.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/inc/functions.php b/inc/functions.php
index 0f70d447..ab55d214 100755
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -2459,6 +2459,9 @@ function slugify($post) {
// Transliterate local characters like ΓΌ, I wonder how would it work for weird alphabets :^)
$slug = iconv("UTF-8", "ASCII//TRANSLIT//IGNORE", $slug);
+ // Remove Tinyboard custom markup
+ $slug = preg_replace("/<tinyboard [^>]+>.*?<\/tinyboard>/s", '', $slug);
+
// Downcase everything
$slug = strtolower($slug);