Quotes in Insta post description break the HTML layout.

Permalink Browser Info Environment
To reproduce add upper quotes " to the description of an Insta post, which will result in breaking the HTML layout, where they are placed in the image title without html encoding.

1 Attachment

Type: Ticket
Status: In Progress
staublicht
View Replies:
staublicht replied on at Permalink Reply
staublicht
I fixed it in my project by escaping html special characters for the image caption in the title text, in the JS for the Fancybox.

This is where the string that can break the layout is created, and how I fixed it. Could maybe be done better with Jquery:

Added this function:
function escapeHtml(text) {
  var map = {
    '&': '&',
    '<': '<',
    '>': '>',
    '"': '"',
    "'": '''
  };


used it here:
i.caption ? (l = escapeHtml(i.caption),

concrete5 Environment Information

Safari on OSX

Browser User-Agent String

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Safari/605.1.15

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.