Echoed URL Gets Mangled
-
In a section of code I’m attempting to show a menu title and the associated featured image.
The featured image is going to be the background of a
element, like this:echo ‘
‘. $menu->title .’
‘;
Whenever any of these urls are rendered into the browser the url is completely garbled from this:
“http://localhost:8085/wp-content/uploads/D_DSC0130.png”
Into this:
url(” http:=”” localhost:8085=”” wp-content=”” uploads=”” d_dsc0130.png”)”=””>
I’ve not seen any posts or discussion talking about anything similar. The site is hosted in IIS and running on PHP 7.1.7.
I have already attempted to escape the returned value with this:
echo ‘
‘. $menu->title .’
‘;
But the URL is always completely broken.
How can I correct the rendered values?
-
Hi there – these forums are for sites hosted on WordPress.com.
If you need further help with a self-hosted theme you’re developing (or the child theme of an existing theme you’re modifying) feel free to post over at WordPress.org:
https://wordpress.org/support/
You’ll need a free WordPress.org account to post – if you don’t already have one, you can register here:
- The topic ‘Echoed URL Gets Mangled’ is closed to new replies.