[wp-trac] [WordPress Trac] #60286: Unencrypted links get their "http://" stripped from href attribute

WordPress Trac noreply at wordpress.org
Thu Jan 18 17:00:30 UTC 2024


#60286: Unencrypted links get their "http://" stripped from href attribute
--------------------------+-----------------------------
 Reporter:  vicobot       |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  6.4.2
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 When you enter a link that starts with "http://", WordPress will strip
 that, leaving you with an URL like "www.some-domain.com" in the href
 attribute. Links that start with "https://" do not show this behaviour.

 To reproduce:
 * Take a fresh WordPress install with the latest version (I downgraded one
 of my sites back to 6.0, and it still had the same problem; I did not test
 with a classic theme).
 * Create a post with a couple of internal and external links, some
 starting with http, some starting with https.
 * Publish and view the post.
 * Hover the mouse over the links and observe the links shown at the bottom
 of the browser window: https-links will look ok, links that you entered
 with http:// will have lost the scheme and the slashes, so that they start
 with the servername.

 Excpected output: Both http and https URLs in href attributes should be
 left intact and keep the specified scheme and the slashes.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/60286>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list