diff --git a/app/views/articles/_splash.html.erb b/app/views/articles/_splash.html.erb index 787f39333..8f5f1621f 100644 --- a/app/views/articles/_splash.html.erb +++ b/app/views/articles/_splash.html.erb @@ -49,5 +49,5 @@
- +
diff --git a/app/views/html_variants/_single_html_variant.html.erb b/app/views/html_variants/_single_html_variant.html.erb index df8096196..074d91d9a 100644 --- a/app/views/html_variants/_single_html_variant.html.erb +++ b/app/views/html_variants/_single_html_variant.html.erb @@ -3,7 +3,7 @@

<%= html_variant.name %>

- +
<% if html_variant.published %> published diff --git a/app/views/liquids/_asciinema.html.erb b/app/views/liquids/_asciinema.html.erb index a583aac3f..e1689686a 100644 --- a/app/views/liquids/_asciinema.html.erb +++ b/app/views/liquids/_asciinema.html.erb @@ -3,6 +3,7 @@ scrolling="no" id="asciinema_<%= id %>" src="https://asciinema.org/a/<%= id %>/iframe" + loading="lazy" style="width:100%;height:50vh;">
diff --git a/app/views/liquids/_blogcast.html.erb b/app/views/liquids/_blogcast.html.erb index 93a0fa329..67ddcdc0d 100644 --- a/app/views/liquids/_blogcast.html.erb +++ b/app/views/liquids/_blogcast.html.erb @@ -5,5 +5,6 @@ mozallowfullscreen="true" src="https://blogcast.host/embed/<%= id %>" style="width:100%;min-height:132px;overflow:hidden;margin:0;" + loading="lazy" webkitallowfullscreen="true"> diff --git a/app/views/liquids/_codepen.html.erb b/app/views/liquids/_codepen.html.erb index d47ba3bd6..e61c5a41b 100644 --- a/app/views/liquids/_codepen.html.erb +++ b/app/views/liquids/_codepen.html.erb @@ -4,5 +4,6 @@ scrolling="no" frameborder="no" allowtransparency="true" + loading="lazy" style="width: 100%;"> diff --git a/app/views/liquids/_codesandbox.html.erb b/app/views/liquids/_codesandbox.html.erb index 887714626..e75428ab2 100644 --- a/app/views/liquids/_codesandbox.html.erb +++ b/app/views/liquids/_codesandbox.html.erb @@ -2,5 +2,6 @@ src="<%= "https://codesandbox.io/embed/#{id}#{query}" %>" style="width:100%; height:calc(300px + 8vw); border:0; border-radius: 4px; overflow:hidden;" allow="geolocation; microphone; camera; midi; vr; accelerometer; gyroscope; payment; ambient-light-sensor; encrypted-media; usb" + loading="lazy" sandbox="allow-modals allow-forms allow-popups allow-scripts allow-same-origin"> diff --git a/app/views/liquids/_glitch.html.erb b/app/views/liquids/_glitch.html.erb index a05775ed3..14ff9a89d 100644 --- a/app/views/liquids/_glitch.html.erb +++ b/app/views/liquids/_glitch.html.erb @@ -3,5 +3,6 @@ sandbox="allow-same-origin allow-scripts allow-forms allow-top-navigation-by-user-activation" src="https://glitch.com/embed/#!/embed/<%= id %>?<%= query %>" alt="<%= id %> on glitch" - style="height: 100%; width: 100%; border: 0;margin:0;padding:0"> + style="height: 100%; width: 100%; border: 0;margin:0;padding:0" + loading="lazy"> diff --git a/app/views/liquids/_instagram.html.erb b/app/views/liquids/_instagram.html.erb index 3d01936fb..89ec44052 100644 --- a/app/views/liquids/_instagram.html.erb +++ b/app/views/liquids/_instagram.html.erb @@ -5,7 +5,8 @@ allowtransparency="true" frameborder="0" data-instgrm-payload-id="instagram-media-payload-0" - scrolling="no"> + scrolling="no" + loading="lazy"> diff --git a/app/views/liquids/_jsfiddle.html.erb b/app/views/liquids/_jsfiddle.html.erb index adcee03dd..df25e8832 100644 --- a/app/views/liquids/_jsfiddle.html.erb +++ b/app/views/liquids/_jsfiddle.html.erb @@ -5,5 +5,6 @@ scrolling="no" frameborder="no" allowfullscreen - allowtransparency="true"> + allowtransparency="true" + loading="lazy"> diff --git a/app/views/liquids/_kotlin.html.erb b/app/views/liquids/_kotlin.html.erb index d666db062..7254a778a 100644 --- a/app/views/liquids/_kotlin.html.erb +++ b/app/views/liquids/_kotlin.html.erb @@ -3,4 +3,5 @@ allowtransparency="true" scrolling="no" frameborder="0" + loading="lazy" > diff --git a/app/views/liquids/_parler.html.erb b/app/views/liquids/_parler.html.erb index 32c6e94b0..8223e6bc8 100644 --- a/app/views/liquids/_parler.html.erb +++ b/app/views/liquids/_parler.html.erb @@ -1,5 +1,6 @@ diff --git a/app/views/liquids/_replit.html.erb b/app/views/liquids/_replit.html.erb index de67318fa..f67241634 100644 --- a/app/views/liquids/_replit.html.erb +++ b/app/views/liquids/_replit.html.erb @@ -1,3 +1,3 @@
- +
diff --git a/app/views/liquids/_slideshare.html.erb b/app/views/liquids/_slideshare.html.erb index 3243e4213..b86c5e7d2 100644 --- a/app/views/liquids/_slideshare.html.erb +++ b/app/views/liquids/_slideshare.html.erb @@ -5,5 +5,6 @@ height="<%= height %>" frameborder="0" scrolling="no" + loading="lazy" allowfullscreen> diff --git a/app/views/liquids/_soundcloud.html.erb b/app/views/liquids/_soundcloud.html.erb index 35a2173ae..dde2f30bc 100644 --- a/app/views/liquids/_soundcloud.html.erb +++ b/app/views/liquids/_soundcloud.html.erb @@ -4,5 +4,5 @@ scrolling="no" frameborder="no" allow="autoplay" - src="https://w.soundcloud.com/player/?url=<%= link %>&auto_play=false&color=%23000000&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true"> + src="https://w.soundcloud.com/player/?url=<%= link %>&auto_play=false&color=%23000000&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true" loading="lazy"> diff --git a/app/views/liquids/_speakerdeck.html.erb b/app/views/liquids/_speakerdeck.html.erb index aaeb97b42..3b521e298 100644 --- a/app/views/liquids/_speakerdeck.html.erb +++ b/app/views/liquids/_speakerdeck.html.erb @@ -16,5 +16,6 @@ height: 100%; left: 0; top: 0;" webkitallowfullscreen="true" - width="710"> + width="710" + loading="lazy"> diff --git a/app/views/liquids/_spotify.html.erb b/app/views/liquids/_spotify.html.erb index 600e2cbd6..b32ee721a 100644 --- a/app/views/liquids/_spotify.html.erb +++ b/app/views/liquids/_spotify.html.erb @@ -5,5 +5,6 @@ frameborder="0" allowtransparency="true" allow="encrypted-media" - src="<%= embed_link %>"> + src="<%= embed_link %>" + loading="lazy"> diff --git a/app/views/liquids/_stackblitz.html.erb b/app/views/liquids/_stackblitz.html.erb index 02965302e..57d648f10 100644 --- a/app/views/liquids/_stackblitz.html.erb +++ b/app/views/liquids/_stackblitz.html.erb @@ -5,5 +5,6 @@ scrolling="no" frameborder="no" allowfullscreen - allowtransparency="true"> + allowtransparency="true" + loading="lazy"> diff --git a/app/views/liquids/_vimeo.html.erb b/app/views/liquids/_vimeo.html.erb index 965c50aaa..b381c1b8a 100644 --- a/app/views/liquids/_vimeo.html.erb +++ b/app/views/liquids/_vimeo.html.erb @@ -5,5 +5,6 @@ frameborder="0" webkitallowfullscreen mozallowfullscreen - allowfullscreen> + allowfullscreen + loading="lazy"> diff --git a/app/views/liquids/_youtube.html.erb b/app/views/liquids/_youtube.html.erb index 9d2f7b71a..1f80d9bc4 100644 --- a/app/views/liquids/_youtube.html.erb +++ b/app/views/liquids/_youtube.html.erb @@ -2,5 +2,6 @@ width="<%= width %>" height="<%= height %>" src="https://www.youtube.com/embed/<%= id %>" - allowfullscreen> + allowfullscreen + loading="lazy"> diff --git a/app/views/pages/live.html.erb b/app/views/pages/live.html.erb index dc6f8477c..1e52f2f5a 100644 --- a/app/views/pages/live.html.erb +++ b/app/views/pages/live.html.erb @@ -29,7 +29,7 @@
- +
" data-chat-channels="<%= @chat_channels %>" data-chat-options="<%= { showChannelsList: false, showTimestamp: false, activeChannelId: @active_channel.id }.to_json %>"> diff --git a/spec/fixtures/approvals/parlertag/id/accepts_a_valid_parler_url.approved.html b/spec/fixtures/approvals/parlertag/id/accepts_a_valid_parler_url.approved.html new file mode 100644 index 000000000..9e1c5aad4 --- /dev/null +++ b/spec/fixtures/approvals/parlertag/id/accepts_a_valid_parler_url.approved.html @@ -0,0 +1,7 @@ + + + + + + diff --git a/spec/liquid_tags/parler_tag_spec.rb b/spec/liquid_tags/parler_tag_spec.rb index 3728fdb5b..779f46873 100644 --- a/spec/liquid_tags/parler_tag_spec.rb +++ b/spec/liquid_tags/parler_tag_spec.rb @@ -11,19 +11,9 @@ RSpec.describe ParlerTag, type: :liquid_template do Liquid::Template.parse("{% parler #{id} %}") end - def generate_iframe(_id) - <<~HTML - - HTML - end - it "accepts a valid Parler URL" do liquid = generate_new_liquid(valid_id) - expect(liquid.render).to eq(generate_iframe(valid_id)) + verify(format: :html) { liquid.render } end it "raises an error for invalid IDs" do diff --git a/spec/liquid_tags/spotify_tag_spec.rb b/spec/liquid_tags/spotify_tag_spec.rb index 6a2a0e3c2..6964e1be9 100644 --- a/spec/liquid_tags/spotify_tag_spec.rb +++ b/spec/liquid_tags/spotify_tag_spec.rb @@ -22,7 +22,8 @@ RSpec.describe SpotifyTag, type: :liquid_template do frameborder="0" allowtransparency="true" allow="encrypted-media" - src="#{parsed_uri} "> + src="#{parsed_uri} " + loading="lazy"> HTML end diff --git a/spec/support/fixtures/approvals/codepen_liquid_tag.approved.html b/spec/support/fixtures/approvals/codepen_liquid_tag.approved.html index 0263566fe..fe7ed4cbb 100644 --- a/spec/support/fixtures/approvals/codepen_liquid_tag.approved.html +++ b/spec/support/fixtures/approvals/codepen_liquid_tag.approved.html @@ -1,7 +1,7 @@ - diff --git a/spec/support/fixtures/approvals/instagram_liquid_tag.approved.html b/spec/support/fixtures/approvals/instagram_liquid_tag.approved.html index 8417871dd..71df1bd1e 100644 --- a/spec/support/fixtures/approvals/instagram_liquid_tag.approved.html +++ b/spec/support/fixtures/approvals/instagram_liquid_tag.approved.html @@ -2,7 +2,7 @@
-
diff --git a/spec/support/fixtures/approvals/jsfiddle_liquid_tag.approved.html b/spec/support/fixtures/approvals/jsfiddle_liquid_tag.approved.html index 0854a0dee..1fad6d628 100644 --- a/spec/support/fixtures/approvals/jsfiddle_liquid_tag.approved.html +++ b/spec/support/fixtures/approvals/jsfiddle_liquid_tag.approved.html @@ -1,7 +1,7 @@ - diff --git a/spec/support/fixtures/approvals/kotlin_liquid_tag.approved.html b/spec/support/fixtures/approvals/kotlin_liquid_tag.approved.html index e86452526..a03e9e84c 100644 --- a/spec/support/fixtures/approvals/kotlin_liquid_tag.approved.html +++ b/spec/support/fixtures/approvals/kotlin_liquid_tag.approved.html @@ -1,6 +1,6 @@ - + diff --git a/spec/support/fixtures/approvals/soundcloud_liquid_tag.approved.html b/spec/support/fixtures/approvals/soundcloud_liquid_tag.approved.html index d32c76827..65caac44e 100644 --- a/spec/support/fixtures/approvals/soundcloud_liquid_tag.approved.html +++ b/spec/support/fixtures/approvals/soundcloud_liquid_tag.approved.html @@ -1,7 +1,7 @@ - diff --git a/spec/support/fixtures/approvals/youtube_liquid_tag_no_time.approved.html b/spec/support/fixtures/approvals/youtube_liquid_tag_no_time.approved.html index c7e37d621..bb657b52d 100644 --- a/spec/support/fixtures/approvals/youtube_liquid_tag_no_time.approved.html +++ b/spec/support/fixtures/approvals/youtube_liquid_tag_no_time.approved.html @@ -1,7 +1,7 @@ - diff --git a/spec/support/fixtures/approvals/youtube_liquid_tag_no_time_trailing_space.approved.html b/spec/support/fixtures/approvals/youtube_liquid_tag_no_time_trailing_space.approved.html index c7e37d621..bb657b52d 100644 --- a/spec/support/fixtures/approvals/youtube_liquid_tag_no_time_trailing_space.approved.html +++ b/spec/support/fixtures/approvals/youtube_liquid_tag_no_time_trailing_space.approved.html @@ -1,7 +1,7 @@ - diff --git a/spec/support/fixtures/approvals/youtube_liquid_tag_with_time.approved.html b/spec/support/fixtures/approvals/youtube_liquid_tag_with_time.approved.html index 37f4ace99..d2dc376e2 100644 --- a/spec/support/fixtures/approvals/youtube_liquid_tag_with_time.approved.html +++ b/spec/support/fixtures/approvals/youtube_liquid_tag_with_time.approved.html @@ -1,7 +1,7 @@ -