[wp-trac] [WordPress Trac] #56120: WordPress should add a space character on every possible "wrap point" in a post title when building "html title", "og:title" and so on
WordPress Trac
noreply at wordpress.org
Fri Jul 1 20:39:26 UTC 2022
#56120: WordPress should add a space character on every possible "wrap point" in a
post title when building "html title", "og:title" and so on
-------------------------+------------------------------
Reporter: pezcurrel | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Formatting | Version:
Severity: normal | Resolution:
Keywords: 2nd-opinion | Focuses:
-------------------------+------------------------------
Changes (by sabernhardt):
* keywords: => 2nd-opinion
* component: General => Formatting
Comment:
If the title has a line break element without a space, that would affect
the URL slug, too.
However, if I add spaces,
`First line <br>second line <br>third line`
results in a title of
`<title>First line second line third line – Example Site</title>`
and a URL of
`https://example.com/first-line-second-line-third-line/`
To be thorough, the line break could match `<br` (the tag might be `<br>`,
`<br/>` or `<br />`—and it could have an attribute).
I added '2nd-opinion' because I think there might be a reason not to make
this change for everyone, but I have not thought of an example of an
inappropriate case (perhaps in another language). Ideally, users would add
the spaces as needed and get them in the heading as well as the title and
URL, though this is a predictable thing to correct.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56120#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list