So I have a post with img src in it, after which goes the "more" tag. Something like this:

text
<img src= http://images.com/images/image.jpg>
text
<!--more-->
more text

Notice the space after "img src= ". So this code is displaying just fine in the single page, but on the main page of my site, when the_content() function is automatically generating excerpt up to "--more--" tag, it for some reason inserts "/" just after image url. So it looks like this:

<img src= http://images.com/images/image.jpg/>

And this DOES NOT work, it behaves like broken image. For now I can't define images in HTML differently. (I know, that no space and quotes would be nice. Alas.)

Where can I fix this - I mean, tell the_content() not to insert "/" ?

  • Why aren't you using quotes around the src attribute? – Jacob Peattie Sep 4 at 16:16

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.