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."