[wp-trac] [WordPress Trac] #46355: get_page_by_title() doesnt work if title has an apostrophe ( ‘ )
WordPress Trac
noreply at wordpress.org
Wed Feb 27 06:51:05 UTC 2019
#46355: get_page_by_title() doesnt work if title has an apostrophe ( ‘ )
-------------------------------+-------------------------------
Reporter: WPnerdzz | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Posts, Post Types | Version: 5.1
Severity: normal | Resolution:
Keywords: needs-patch | Focuses: coding-standards
-------------------------------+-------------------------------
Comment (by immeet94):
Hi, @WPnerdzz thanks for your ticket and welcome to WordPress Trac :)
you try to use sanitize_title() function for the getting title.
here the example for:
$content = sanitize_title( $content );
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46355#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list