[wp-trac] [WordPress Trac] #44595: wp_insert_post() inserts wrong GUID (adds http:// prefix)

WordPress Trac noreply at wordpress.org
Tue Jul 17 14:38:28 UTC 2018


#44595: wp_insert_post() inserts wrong GUID (adds http:// prefix)
--------------------------+------------------------------
 Reporter:  Looimaster    |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  2nd-opinion   |     Focuses:
--------------------------+------------------------------
Changes (by JPry):

 * keywords:   => 2nd-opinion


Comment:

 The process that actually adds the `http://` prefix is the `esc_url_raw()`
 function hooked to the `pre_post_guid` filter. This can be found by
 searching for the filter in `default-filters.php`.

 I don't believe this is an actual bug. WordPress uses GUIDs as an actual
 URL for RSS feeds, and so GUIDs need to be a real URL rather than an
 arbitrary text string. With that said, I'm not going to change the status
 of this ticket, in case there's other feedback. I found a bit of
 information related to GUIDs here: https://deliciousbrains.com/wordpress-
 post-guids-sometimes-update/.

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


More information about the wp-trac mailing list