[wp-trac] [WordPress Trac] #64089: Post titles containing non-breaking hyphens are not sanitized
WordPress Trac
noreply at wordpress.org
Wed Oct 22 05:48:34 UTC 2025
#64089: Post titles containing non-breaking hyphens are not sanitized
----------------------------------------+--------------------------
Reporter: patpiwo | Owner: westonruter
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: 6.9
Component: Formatting | Version: trunk
Severity: trivial | Resolution:
Keywords: has-patch needs-unit-tests | Focuses:
----------------------------------------+--------------------------
Comment (by patpiwo):
Replying to [comment:2 westonruter]:
> Thanks for opening this and for the PR!
>
> I'm curious how you encountered this issue? Would there be other hyphen-
like characters which would be suitable for turning into hyphens?
I encountered the issue when a user used the non-breaking hyphen in their
post title. The non-breaking hyphen was used within a hyphenated product
name which I assume they didn't want broken between lines. I'm guessing
they copied it from some sort of marketing material but I'm not really
sure.
As far as other hyphens go, I don't know if I have the knowlege to answer
that question. I see 13 different characters listed under
[https://www.compart.com/en/unicode/category/Pd dash punctuation] and I'm
hesitant to broaden the scope of this fix unecessarily without knowing
which dashes are common enough to be covered. If you have insight into
this feel free to suggest or make any changes.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64089#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list