Browse Source
Merge pull request #56 from towards-a-new-leftypol/fixes
use mb_convert_encoding instead of iconv in slugify function in functions.php
pull/40/head
nonmakina
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
1 deletions
-
inc/functions.php
|
@ -2717,7 +2717,8 @@ function slugify($post) { |
|
|
$slug = mb_convert_encoding($slug, "UTF-8", "UTF-8"); |
|
|
$slug = mb_convert_encoding($slug, "UTF-8", "UTF-8"); |
|
|
|
|
|
|
|
|
// Transliterate local characters like ü, I wonder how would it work for weird alphabets :^) |
|
|
// Transliterate local characters like ü, I wonder how would it work for weird alphabets :^) |
|
|
$slug = iconv("UTF-8", "ASCII//TRANSLIT//IGNORE", $slug); |
|
|
// $slug = iconv("UTF-8", "ASCII//TRANSLIT//IGNORE", $slug); |
|
|
|
|
|
$slug = mb_convert_encoding($slug, "ASCII", "UTF-8"); |
|
|
|
|
|
|
|
|
// Remove Tinyboard custom markup |
|
|
// Remove Tinyboard custom markup |
|
|
$slug = preg_replace("/<tinyboard [^>]+>.*?<\/tinyboard>/s", '', $slug); |
|
|
$slug = preg_replace("/<tinyboard [^>]+>.*?<\/tinyboard>/s", '', $slug); |
|
|