diff --git a/app/models/communication/block/component/code.rb b/app/models/communication/block/component/code.rb index 6103aa8e60683bb3b983a2c810273c82feb017c9..9e7833203d77304567de1fda56d65707193e11fa 100644 --- a/app/models/communication/block/component/code.rb +++ b/app/models/communication/block/component/code.rb @@ -1,8 +1,4 @@ class Communication::Block::Component::Code < Communication::Block::Component::Base - def data=(value) - @data = Osuny::Sanitizer.sanitize value, 'text' - end - - end +end \ No newline at end of file diff --git a/app/views/admin/communication/blocks/templates/embed/_edit.html.erb b/app/views/admin/communication/blocks/templates/embed/_edit.html.erb index 5a93367a43028539c0c3d16ba9f5d080820c674b..a80ac1993be6f063243f1b2ad0beead1ad2ad1ab 100644 --- a/app/views/admin/communication/blocks/templates/embed/_edit.html.erb +++ b/app/views/admin/communication/blocks/templates/embed/_edit.html.erb @@ -1,3 +1,8 @@ +<div class="row"> + <div class="col-md-6"> + <p class="text-danger lead"><%= t '.warning' %></p> + </div> +</div> <div class="row"> <div class="col-md-6"> <%= block_component_edit :code %> diff --git a/config/locales/communication/en.yml b/config/locales/communication/en.yml index 9e5ff82da493839f35f4c0d1f63937a82bed19e9..b5e6644ce1d933ef78bfd483703c0b97b35371fe 100644 --- a/config/locales/communication/en.yml +++ b/config/locales/communication/en.yml @@ -218,6 +218,7 @@ en: iframe_title: label: Iframe title (mandatory for accessibility) placeholder: Enter the title + warning: Beware, the code below is used as is, without any security filtering. Be extremely careful and never integrate possibly unreliable code. files: description: A list of downloadable files, mentioning their file size. edit: diff --git a/config/locales/communication/fr.yml b/config/locales/communication/fr.yml index e7d418ad4774496865ffdb7c7e348c9498dae8c5..3360033356516d95a8acc9fff0f7976c3dbbdd97 100644 --- a/config/locales/communication/fr.yml +++ b/config/locales/communication/fr.yml @@ -218,6 +218,7 @@ fr: iframe_title: label: Titre de l'iframe (nécessaire pour l'accessibilité) placeholder: Entrer le titre + warning: Attention, le code ci-dessous est intégré tel quel, sans filtrage de sécurité. N'intégrez jamais de code externe dont la fiabilité n'est pas certaine. files: description: Une liste de fichiers téléchargeables, présentés avec leur poids. edit: