diff --git a/pathauto.inc b/pathauto.inc index 9699aa0..1295ade 100644 --- a/pathauto.inc +++ b/pathauto.inc @@ -195,16 +195,19 @@ function pathauto_cleanstring($string, array $options = array()) { // Remove all HTML tags from the string. $output = strip_tags(decode_entities($string)); + // Replace or drop punctuation based on user settings. + $output = strtr($output, $cache['punctuation']); + // Optionally transliterate (by running through the Transliteration module) if ($cache['transliterate']) { // If the reduce strings to letters and numbers is enabled, don't bother // replacing unknown characters with a question mark. Use an empty string // instead. $output = transliteration_get($output, $cache['reduce_ascii'] ? '' : '?', $langcode); - } - // Replace or drop punctuation based on user settings - $output = strtr($output, $cache['punctuation']); + // Catch any transliterated punctuation. + $output = strtr($output, $cache['punctuation']); + } // Reduce strings to letters and numbers if ($cache['reduce_ascii']) {