diff --git a/src/AliasCleaner.php b/src/AliasCleaner.php index 340a266..4854f97 100644 --- a/src/AliasCleaner.php +++ b/src/AliasCleaner.php @@ -228,6 +228,9 @@ class AliasCleaner implements AliasCleanerInterface { $output = Html::decodeEntities($string); $output = PlainTextOutput::renderFromHtml($output); + // Replace or drop punctuation based on user settings. + $output = strtr($output, $this->cleanStringCache['punctuation']); + // Optionally transliterate. if ($this->cleanStringCache['transliterate']) { // If the reduce strings to letters and numbers is enabled, don't bother @@ -236,8 +239,6 @@ class AliasCleaner implements AliasCleanerInterface { $output = $this->transliteration->transliterate($output, $langcode, $this->cleanStringCache['reduce_ascii'] ? '' : '?'); } - // Replace or drop punctuation based on user settings. - $output = strtr($output, $this->cleanStringCache['punctuation']); // Reduce strings to letters and numbers. if ($this->cleanStringCache['reduce_ascii']) {