Gutenberg: underscore in the link (in site url)

Created on 24 Dec 2018  路  4Comments  路  Source: WordPress/gutenberg

instead of a hyphen, it is possible to insert an underscore in the URL of the entry link?
"_" converted to "-"

screenshot: https://yadi.sk/i/T1QvHCufUGUYFw

[Feature] Permalink [Type] Enhancement

Most helpful comment

Gutenberg apparently doesn't allow user to manually change dashes to underscores in permalink. After modifying wp-includes/formatting.php it is possible to change it with standard editor and quick edit but not Gutenberg. I thik this should be considered a bug and needs to be fixed.

The "obligatory" space/underscore to dash is very annoying and arbitrary. It must stay as users decision how to treat spaces and the "look" of permalinks. Right now almost everyone seems to blindly follow Google's suggestion to use dashes instead of underscores. This is apparently based on subjective opinion of google programmers. Google is not religion and we are not believers here.

All 4 comments

What about allowing all URL valid characters? Good summary can be found here https://perishablepress.com/stop-using-unsafe-characters-in-urls/
together with RFC 3986 and 1738.

cc @earnjam in case you have more context here.

I've worked on #12009 which will help with permalink editing to some extent, but it doesn't solve this specifically. It's finally unblocked as of the end of last week, so I'll work on getting it refreshed now and hopefully we can merge that soon.

To completely resolve these types of little character quirks, the best solution is to fully recreate sanitize_title() in JS. I introduced clean_for_slug() a while back as a short term solution, but it only does a partial match to what core does on save.

Gutenberg apparently doesn't allow user to manually change dashes to underscores in permalink. After modifying wp-includes/formatting.php it is possible to change it with standard editor and quick edit but not Gutenberg. I thik this should be considered a bug and needs to be fixed.

The "obligatory" space/underscore to dash is very annoying and arbitrary. It must stay as users decision how to treat spaces and the "look" of permalinks. Right now almost everyone seems to blindly follow Google's suggestion to use dashes instead of underscores. This is apparently based on subjective opinion of google programmers. Google is not religion and we are not believers here.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

spocke picture spocke  路  3Comments

jasmussen picture jasmussen  路  3Comments

franz-josef-kaiser picture franz-josef-kaiser  路  3Comments

moorscode picture moorscode  路  3Comments

cr101 picture cr101  路  3Comments