[wp-trac] [WordPress Trac] #10792: Forward Slashes convert to hyphens in post slugs
WordPress Trac
noreply at wordpress.org
Mon Feb 2 14:16:57 UTC 2015
#10792: Forward Slashes convert to hyphens in post slugs
----------------------------------------+-----------------------------
Reporter: alxndr | Owner:
Type: enhancement | Status: new
Priority: low | Milestone: Future Release
Component: Formatting | Version: 3.8
Severity: minor | Resolution:
Keywords: has-patch needs-unit-tests | Focuses:
----------------------------------------+-----------------------------
Comment (by corvidism):
Replying to [comment:19 miqrogroove]:
> To move this forward, let's see some tests, and let's make sure multiple
slashes or spaces never convert into multiple hyphens. I'm in favor of
jtsternberg's idea to convert ampersand to a hypen rather than to strip,
assuming we are not dealing with HTML encoded strings.
Okay, lets see.
I tried to apply the jtsternberg's patch, but that failed: there were some
other changes made to `formatting.php` since then and the patched file
doesn't even pass the current unit tests.
I did, however, get to work the earlier patch by GhostToast, the one that
only adds the "forward slash to dash" functionality. I wrote a bunch of
unit tests for multiple slashes and positions, so it seems to be safe.
So... what now?
IMO replacing "&" to "-and-" or "&c." to "-etc-" is wrong, because it
ignores languages other then English. Should we replace it with a dash,
too?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/10792#comment:20>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list