We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17851
    • 213 Posts
    I’ve been using the sample code for displaying picture and thumbs on the same page as suggested on the wiki:
    http://wiki.modxcms.com/index.php/MaxiGallery#Picture_and_thumbnails_on_same_page

    I’ve had issues with this when I use special characters in the title or description. For example, if I title an image "Cat’s Meow", then clicking the thumb will not work and it gives a javascript error "missing ) after argument list". This happens because even though the apostrophe is rendered in HTML as ’ the javascript call to showPic still interprets that as a termination character. Has anyone experienced the same issue?

    The same happens when using CR/LF in the description field except the error is "unterminated string literal".
      Mark Macatee
      President
      Power 10 Solutions
      http://www.power10solutions.com
      • 7923
      • 4,213 Posts
      You need to create a custom phx modifier what converts single quotes and use that in the mgGalleryPicture in title and description placeholders instead of the :htmlent modifier.


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."