Opened 8 years ago
Last modified 8 years ago
#40334 new defect (bug)
Trim siteurl and homeurl
Reported by: | thamaraiselvam | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 4.7.3 |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
I have seen some sites accidently put new line or space end of the siteurl and home in the wp_options
So whenever WordPress defines constants like WP_CONTENT_URL its not trimming the siteurl
/wp-includes/default-constants.php
function wp_plugin_directory_constants() {
if (!defined('WP_CONTENT_URL')) {
define('WP_CONTENT_URL', get_option('siteurl') . '/wp-content');
}
If siteurl has the new line in the end and plugin_url()
gives the result as follow
https://example.com /wp-content/plugins/myplugin/
As javascript is not supporting multiline string so it just broke my UI.
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
This sample patch but it should be done everywhere