Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
It'd be nice to have support for replacing
with the separator, perhaps in the punctuation replacement section. Currently, using
in a content title renders an automatic URL alias with %C2%A0
in the URL. Also, adding " ", " " (non-breaking space character), or "%C2%A0" to the "STRINGS TO REMOVE" field all fail to remove the character, and that option wouldn't replace it with the separator anyway.
Alternatively, just always treating
exactly the same as the standard space character would be a logical and probably simpler solution.
Comments
Comment #2
calvinjuarez CreditAttribution: calvinjuarez as a volunteer commentedComment #3
calvinjuarez CreditAttribution: calvinjuarez as a volunteer commentedComment #4
calvinjuarez CreditAttribution: calvinjuarez as a volunteer commentedComment #5
calvinjuarez CreditAttribution: calvinjuarez as a volunteer commentedComment #6
markdcI'm surprised this hasn't been addressed yet. Some content authors use non-breaking spaces in title fields to control how text is displayed. I agree that that they should be handled as normal spaces.
While we're at it, all other "visual" spaces should be included:
 
 
 
	
CHARACTER TABULATION 
THREE-PER-EM SPACE 
FOUR-PER-EM SPACE 
SIX-PER-EM SPACE 
FIGURE SPACE 
PUNCTUATION SPACE 
HAIR SPACE 
NARROW NO-BREAK SPACE 
MEDIUM MATHEMATICAL SPACE 
IDEOGRAPHIC SPACEZERO WIDTH SPACE (
​
) is not visually represented and should simply be removed without any substitution choices.@calvinjuarez
Using the "Strings to remove" settings field does work if you paste the rendered HTML rather than the encoding. True, it doesn't produce the desired effect of hyphenated strings, but it's better than seeing
%C2%A0
in the URL.Opening a separate issue for D8.
Comment #7
cdmo CreditAttribution: cdmo commentedHere's a workaround with
hook_pathauto_punctuation_chars_alter()
, for example with non-breaking spaces:Then you'd have to select "Separator" under "Punctuation" at /admin/config/search/path/settings for "Non-breaking space."