Browse Source

Revert iframe title

Marc Bellêtre 4 years ago
parent
commit
797fa03357
1 changed files with 2 additions and 2 deletions
  1. 2 2
      tarteaucitron.services.js

+ 2 - 2
tarteaucitron.services.js

@@ -1832,7 +1832,7 @@ tarteaucitron.services.instagram = {
     "js": function () {
         "use strict";
         tarteaucitron.fallback(['instagram_post'], function (x) {
-            var post_id = x.getAttribute('postId'),
+            var frame_title = tarteaucitron.fixSelfXSS(x.getAttribute("title") || 'Instagram iframe'),
                 post_permalink = x.getAttribute('data-instgrm-permalink'),
                 embed_width = x.getAttribute('width'),
                 embed_height = x.getAttribute('height'),
@@ -1861,7 +1861,7 @@ tarteaucitron.services.instagram = {
                 frame_height = '"" ';
             }
 
-            post_frame = '<iframe title="Instagram iframe" src="//www.instagram.com/' + post_id + '/embed" ' + frame_width + frame_height + '></iframe>';
+            post_frame = '<iframe title="' + frame_title + '" src="//www.instagram.com/' + post_id + '/embed" ' + frame_width + frame_height + '></iframe>';
 
             return post_frame;
         });