• Hello Alex,

    I am using the latest version of NextGEN Gallery (1.7.4) and I have discovered an issue with the ngg-related-gallery DIV for posts. If one of the related images happens to have some HTML in the description, some parser breaks and it messes up the title attribute for the A element enclosing the picture, causing invalid HTML, which will break the page layout. This is unacceptable, since many image descriptions require some formatting.

    I have traced the faulty code to nextgen-gallery/nggfunctions.php, function nggShowRelatedGallery, line 887. You are doing stripslashes(nggGallery::i18n($picture->description)), but this will not encode the HTML tags, which will break some subsequent code. I used esc_attr instead of just stripslashes and it works fine. I do not know if this is the best solution, though.

    Please fix this in the next version and advise if there is a better solution for this issue.

    Best regards,
    Mihai

    https://www.ads-software.com/extend/plugins/nextgen-gallery/

Viewing 1 replies (of 1 total)
  • I had this problem for a long time myself and was unable to debug. Thanks mihai.todor85 for posting this, it works like a charm, is simple and elegant. I love it.

    Many, many thanks. NGG is a great extension.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: NextGEN Gallery] HTML in image description and related images feature’ is closed to new replies.