I'm having the following problem:
1) taxonomy term has "&", example: diamonds&pearls
2) I had set the address with "path/!name", the separator for "-", and added the exception for remove text with "&" (stand alone)
3) the resulted path is http://www.site.com/path/diamond--pearls
That doesn't match with the default for Pathauto, for example (it would construct the path as http://www.site.com/path/diamond-pearls, with only one separator).
A suggestion: this module could use the function pathauto_cleanstring() from Pathauto to filter the final path, only if this module is installed in the system (or you give an admin option to use that); in this way, the path string transformation would always match perfectly.
Thanks for attention!
Comments
Comment #1
dean.p CreditAttribution: dean.p commentedI had the same problem. By default, "diamonds & pearls" with '&' specified in the Remove text would result in "diamonds--pearls".
I added "$path = preg_replace('/\s+/', ' ', $path);" to the taxonomy_redirect.module code below (Indicated as new):
This takes any spaces greater than one and reduces it to a single space.... result is "diamonds-pearls"
Comment #2
Rob T CreditAttribution: Rob T commentedThanks for this. The on-board help for taxonomy redirect makes it seem like this particular scenario is covered, but it's not.