[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
Tue Jul 5 05:18:48 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:
-------------------------+------------------------------

Comment (by costdev):

 > To be thorough, the line break could match `<br` (the tag might be
 `<br>`, `<br/>` or `<br />`—and it could have an attribute).

 This pattern seems to do the trick: `/(\s)?<br(.*?)>(\s)?/`.
 [https://3v4l.org/XWjQo 3v4l].

 I'm not sure of inappropriate cases either, so I'd be interested in second
 opinions on this.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56120#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list