Support » Fixing WordPress » double quote breaks [ gallery ] display

  • Issue occurs in IE (any version) and the site users seem to all be on IE8.
    Using the WP Gallery ~
    The Titles and Captions of the artwork images include single and double quotes to indicate inches and feet (e.g. Some Name 36′ x 6″ ) These cause the images and link tags to prematurely close, resulting in broken images and links throughout the page. Does anyone know of a solution? (Even though I would love to be able to use it… It is not acceptable for the solution to be not using the quotes.)
    I attempted entering HTML code instead of the actual quote characters but it did not make a difference.


    Thank-you in advance.

    NB: Not 100% sure of the WP version but I know it is not V3.2 since the backup/upgrade can’t be scheduled yet.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Michael


    Forum Moderator

    in your lightbox-gallery plugin, in lightbox-gallery.php, line 517, find:

    $output .= '<'.$icontag.' class="gallery-icon">
    <a href="'.$lightbox_link[0].'" title="'.$attachment->post_excerpt.'"';

    try to replace it with:

    $output .= '<'.$icontag.' class="gallery-icon">
    <a href="'.$lightbox_link[0].'" title="'.esc_attr($attachment->post_excerpt).'"';

    Thank-you; Thank-you; Thank-you! That does the trick. Just need to make IE play nicer with the CSS rules and it will be perfect-O.
    Should have thought of escaping on my own but I think it was just a level of tired frustration that made it harder to think straight.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘double quote breaks [ gallery ] display’ is closed to new replies.