[wp-trac] [WordPress Trac] #56231: WP_Http::make_absolute_url drops fragments

WordPress Trac noreply at wordpress.org
Tue Jul 26 02:38:05 UTC 2022


#56231: WP_Http::make_absolute_url drops fragments
---------------------------------------------------+---------------------
 Reporter:  dshanske                               |       Owner:  (none)
     Type:  defect (bug)                           |      Status:  new
 Priority:  normal                                 |   Milestone:  6.1
Component:  HTTP API                               |     Version:  3.4
 Severity:  normal                                 |  Resolution:
 Keywords:  has-patch has-unit-tests dev-feedback  |     Focuses:
---------------------------------------------------+---------------------

Comment (by peterwilsoncc):

 A [https://wpdirectory.net/search/01G8W4XGZ12PXXP401ZWNDHWTD search of the
 plugin repo for make_absolute_url] shows 88 plugins include the string.
 The most popular plugin (700K installs) is a documentation reference to
 this very bug :)

 Most of the plugins over 1000 installs seem to be false positives; there
 are one or two that are genuine but I don't think they're affected (mainly
 because they use `url_to_postid()` which drops fragments).

 My inclination is to switch to returning the fragment, document the BC
 break in a dev note and refer people to `strip_fragment_from_url()` if
 they were relying on the URL without a fragment.

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


More information about the wp-trac mailing list