Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter YorkshireLad

    (@yorkshirelad)

    Okay – not as corrected as I thought…

    I noticed that additional <br /> tags were being added around my linked site images when I use it. If I edit browser-shots.php, and remove the whitespace around the image tag contained within the link tag in <div class=”browser-shot…>, then the <br /> tags don’t appear.

    Gary

    Plugin Author binarymoon

    (@binarymoon)

    Hi there – thanks for the report. Unfortunately I have been unable to reproduce this.

    Do you have a link where I can see it happening?

    Are you perhaps running a plugin that might change the post content in some way?

    Merging the html onto a single line might be an easy way to fix this in case plugins do change the html – but otherwise I can’t think why it would happen at the moment.

    Thread Starter YorkshireLad

    (@yorkshirelad)

    Hi,

    Try http://www.garytaylor.org.uk/other-things/ – you can see that the images push the text out. The styling I’ve used doesn’t add/affect the line break tags.

    At first glance, the only plugin I have that affects images is the Lightbox one I’m using, but then I’d expect it to affect other images as well – ‘all’ your script does is output an image tag surrounded by an anchor tag. It’s as if WordPress is somehow interpreting the tabbed indents on your script incorrectly and adding the line break.

    Gary

    Plugin Author binarymoon

    (@binarymoon)

    Hi Gary – thanks for that. Still seems strange but I’ve submitted an update that collapses the html into a single line. Hopefully that fixes this.

    Ben

    • This reply was modified 9 years, 5 months ago by binarymoon.
    Thread Starter YorkshireLad

    (@yorkshirelad)

    I agree Ben. Makes no sense!

    But thanks for the fix, I’ve updated and it’s working fine.

    Gary

    Plugin Author binarymoon

    (@binarymoon)

    no problem – glad it’s working properly now.

    Thread Starter YorkshireLad

    (@yorkshirelad)

    And now, time to be embarrassed…

    I was getting the same problem with another plugin. The suggestion to someone else in that plugin’s forum was that it might be wpautop causing the problem. Sure enough, I found one plugin with a shortcode that took wpautop out, then re-added the filter. Commenting out those lines didn’t stop the plugin working, but did fix the extra lines issue, which was the same problem I was having with Browser Shots…

    So I was right that it wasn’t an image-related plugin, but I’d never have thought it was the plugin it turned out to be.

    Gary

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Extraneous line breaks’ is closed to new replies.