]> cat aescling's git repositories - mastodon.git/commitdiff
Add close tag of iframe for oEmbed response (#4745)
authorYamagishi Kazutoshi <ykzts@desire.sh>
Wed, 30 Aug 2017 12:03:17 +0000 (21:03 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Wed, 30 Aug 2017 12:03:17 +0000 (14:03 +0200)
* Add close tag of iframe for oEmbed response

* add comma

app/serializers/oembed_serializer.rb

index 0c2ced859e27026cb4bbdc810c0fe9608a26aee2..3b53509537b91760ee70e6018365866665ec442e 100644 (file)
@@ -37,13 +37,16 @@ class OEmbedSerializer < ActiveModel::Serializer
   end
 
   def html
-    tag :iframe,
-        src: embed_short_account_status_url(object.account, object),
-        style: 'width: 100%; overflow: hidden',
-        frameborder: '0',
-        scrolling: 'no',
-        width: width,
-        height: height
+    attributes = {
+      src: embed_short_account_status_url(object.account, object),
+      style: 'width: 100%; overflow: hidden',
+      frameborder: '0',
+      scrolling: 'no',
+      width: width,
+      height: height,
+    }
+
+    content_tag :iframe, nil, attributes
   end
 
   def width