Add ellipsis replacement to Pathauto To handle users who like to occasionally use the custom ellipsis character from MS Word in titles, I would like to add replacement options for the character in the Punctuation settings for Pathauto using hook_pathauto_punctuation_chars_alter(). The problem is determining what value to put in the value setting in the hook. I found the T_ELLIPSIS constant in tokenizer.php, and tried using it like so:

function my_module_pathauto_punctuation_chars_alter(array &amp;$punctuation) {
  $punctuation['ellipsis'] = array(
    'value' =&gt; T_ELLIPSIS,
    'name' =&gt; t('')
  );
}


and the value shows as Ellipsis (389) for the field label in the settings. However, when the alias is generated with the ellipsis character in the node title, it doesn't get replaced.

Is there a better/easier way to handle this? Also, should I use something like the UTF-8 code instead of the constant?
My prefered solution to scrub out extraneous characters in Pathauto URLs is this option under Configuration » Search and metadata » URL aliases » Settings.



It will scrub out all the extraneous characters that can mess up browsers/crawlers. This is assuming you're on an English language website.