discourse/lib/onebox/discourse_onebox_sanitize_config.rb
Martin Brennan 13c2a4886f
FEATURE: Add disable_onebox_media_download_controls hidden site setting (#12208)
Uses discourse/onebox@ff9ec90

Adds a hidden site setting called disable_onebox_media_download_controls which will add controlslist="nodownload" to video and audio oneboxes, and also to the local video and audio oneboxes within Discourse.
2021-02-25 12:39:15 +10:00

19 lines
428 B
Ruby

# frozen_string_literal: true
module Onebox
class DiscourseOneboxSanitizeConfig
module Config
DISCOURSE_ONEBOX ||=
Sanitize::Config.freeze_config(
Sanitize::Config.merge(
Sanitize::Config::ONEBOX,
attributes: Sanitize::Config.merge(
Sanitize::Config::ONEBOX[:attributes],
'aside' => [:data]
)
)
)
end
end
end