How do I mimic Pathauto transliterated output for an alias in my custom PHP code? When writing my custom function I need to manually append node name to a taxonomy term link. To get the taxonomy term part done I use:

  $link_uri = taxonomy_term_uri($term);
  $path_alias = drupal_get_path_alias($link_uri['path']);


This works ok, now - I want to append node name ("/" . $node_name), but instead of raw string, I want the Pathauto transliterated output, as set in the URL alias configuration, for that node context.

What function should I use to mimic that output? I looked at hook_pathauto_alias_alter(&amp;$alias, array $context) but I'm not sure that's what I need.
If you want to filter your string the way pathauto does it, you can use pathauto_cleanstring():

module_load_include('inc', 'pathauto', 'pathauto');
$node_title .= pathauto_cleanstring($node-&gt;title);