From 9604e0392bf48696a0421a6a5e58de214b5109c8 Mon Sep 17 00:00:00 2001 From: Markus Birth Date: Sat, 15 Jan 2022 18:23:09 +0100 Subject: [PATCH] Fix umlaut replacement to happen before all (UTF-8-)umlauts are stripped. --- include/functions_permalinks.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/functions_permalinks.inc.php b/include/functions_permalinks.inc.php index 1d563f42..7238e3c2 100644 --- a/include/functions_permalinks.inc.php +++ b/include/functions_permalinks.inc.php @@ -121,13 +121,13 @@ function serendipity_makeFilename($str, $stripDots = false) { } } else { // Replace international chars not detected by every locale + $str = str_replace($from, $to, $str); + if (LANG_CHARSET == 'UTF-8') { // URLs need to be 7bit - since this function takes care of the most common ISO-8859-1 // characters, try to UTF8-decode the string first. $str = utf8_decode($str); } - - $str = str_replace($from, $to, $str); } // Nuke chars not allowed in our URI