Skip to content

Commit

Permalink
Merge branch 'develop' into feature/add_gallery_module_0.27
Browse files Browse the repository at this point in the history
  • Loading branch information
paulinebessoles authored Oct 25, 2023
2 parents 211eba7 + 8462b84 commit 6b81c33
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class Application < Rails::Application
config.after_initialize do
require "extends/controllers/decidim/devise/sessions_controller_extends"
require "extends/controllers/decidim/editor_images_controller_extends"
require "extends/services/decidim/iframe_disabler_extends"

Decidim::GraphiQL::Rails.config.tap do |config|
config.initial_query = "{\n deployment {\n version\n branch\n remote\n upToDate\n currentCommit\n latestCommit\n locallyModified\n }\n}".html_safe
Expand Down
13 changes: 13 additions & 0 deletions lib/extends/services/decidim/iframe_disabler_extends.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# frozen_string_literal: true

module IframeDisablerExtends
def perform
@document = Nokogiri::HTML::DocumentFragment.parse(@text)
# disable_iframes(@document)
document.to_html
end
end

Decidim::IframeDisabler.class_eval do
prepend(IframeDisablerExtends)
end
2 changes: 1 addition & 1 deletion spec/system/survey_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
# click_button "Accept all"
expect(page).to have_selector("img[src='#{image_url}']")
# With cookie banner iframe is deactivated
# expect(page).to have_selector("iframe[src='#{image_url}']")
expect(page).to have_selector("iframe[src='#{image_url}']")
end
end

Expand Down

0 comments on commit 6b81c33

Please sign in to comment.