There are a lot of configurable symbols in the pathauto settings (admin/config/search/path/settings).

However there aren't any settings for registered trademark (®) and trademark (™) symbols. I have a client that has a lot of node titles containing these characters, so I have patched the module to include them.

#1 pathauto-trademark_symbols-2065369.patch1.02 KBzhuber
PASSED: [[SimpleTest]]: [MySQL] 322 pass(es).
[ View ]


Status:Active» Needs review
new1.02 KB
PASSED: [[SimpleTest]]: [MySQL] 322 pass(es).
[ View ]

I also added the copyright symbol, for good measure.

You could just enable the 'Reduce to ASCII' option in Pathauto?

Ahh...I didn't see that option.

Well, I think this is still a viable alternative if you didn't want to use the 'Reduce to ASCII' option.

@Dave Reid, that solution does not work if you want to allow unicode URLs (for other languages).

In my opinion, Pathauto should allow to provide a custom list of symbols to be replaced, the same way it allows providing a list of words to be removed.

Actually, it seems like there is a hook that can be used for this purpose (still would be nice to be able to do it through the UI):

* Alter the list of punctuation characters for Pathauto control.
* @param $punctuation
*   An array of punctuation to be controlled by Pathauto during replacement
*   keyed by punctuation name. Each punctuation record should be an array
*   with the following key/value pairs:
*   - value: The raw value of the punctuation mark.
*   - name: The human-readable name of the punctuation mark. This must be
*     translated using t() already.
function hook_pathauto_punctuation_chars_alter(array &$punctuation) {
// Add the trademark symbol.
$punctuation['trademark'] = array('value' => '™', 'name' => t('Trademark symbol'));
// Remove the dollar sign.