[Plugin: NextGEN Gallery] HTML in image description and related images feature
-
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,
Mihaihttps://www.ads-software.com/extend/plugins/nextgen-gallery/
- The topic ‘[Plugin: NextGEN Gallery] HTML in image description and related images feature’ is closed to new replies.