diff --git a/google_tag.module b/google_tag.module index bec1c24..24f2448 100644 --- a/google_tag.module +++ b/google_tag.module @@ -231,7 +231,7 @@ function _google_tag_path_check() { if (!isset($satisfied)) { $config = \Drupal::config('google_tag.settings'); $toggle = $config->get('path_toggle'); - $paths = Unicode::strtolower($config->get('path_list')); + $paths = mb_strtolower($config->get('path_list')); if (empty($paths)) { $satisfied = ($toggle == GOOGLE_TAG_EXCLUDE_LISTED); @@ -239,12 +239,12 @@ function _google_tag_path_check() { else { $request = \Drupal::request(); $current_path = \Drupal::service('path.current'); - $alias_manager = \Drupal::service('path.alias_manager'); + $alias_manager = \Drupal::service('path_alias.manager'); $path_matcher = \Drupal::service('path.matcher'); // @todo Are not some paths case sensitive??? // Compare the lowercase path alias (if any) and internal path. $path = rtrim($current_path->getPath($request), '/'); - $path_alias = Unicode::strtolower($alias_manager->getAliasByPath($path)); + $path_alias = mb_strtolower($alias_manager->getAliasByPath($path)); $satisfied = $path_matcher->matchPath($path_alias, $paths) || (($path != $path_alias) && $path_matcher->matchPath($path, $paths)); $satisfied = ($toggle == GOOGLE_TAG_EXCLUDE_LISTED) ? !$satisfied : $satisfied; }