Skip to content
Extraits de code Groupes Projets
Valider 026aa24e rédigé par echarp's avatar echarp
Parcourir les fichiers

Le markdown est fait avant un sanitize, offrant plus de sécurité vis a vis des attaques xss

parent 54319565
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
%h2
%em= @event.city + ':'
= @event.title
- if @event.persisted? && request.format == 'text/html' && controller.controller_name != 'moderations' && controller.controller_name != 'notes' && controller.action_name != 'edit' && controller.action_name != 'cancel' - if @event.persisted? && request.format == 'text/html' && controller.controller_name != 'moderations' && controller.controller_name != 'notes' && controller.action_name != 'edit' && controller.action_name != 'cancel'
#lug-list #lug-list
%h1=t '.lug-list' %h1=t '.lug-list'
...@@ -21,10 +25,6 @@ ...@@ -21,10 +25,6 @@
%em.fa.fa-thumbs-down %em.fa.fa-thumbs-down
=t '.cancel' =t '.cancel'
%h2
%em= @event.city + ':'
= @event.title
%h3=t '.dateAndPlace' %h3=t '.dateAndPlace'
%p %p
- if @event.same_day? - if @event.same_day?
...@@ -43,10 +43,10 @@ ...@@ -43,10 +43,10 @@
%h3=t '.description' %h3=t '.description'
.description .description
:markdown - markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, autolink: true, tables: true)
#{sanitize @event.description, = sanitize markdown.render(@event.description),
tags: %w(p br table tr td ul ol li a strong b em i img), tags: %w(p br table tr td ul ol li a strong b em i img),
attributes: %w(href src width height)} attributes: %w(href src width height)
%h3=t '.infos' %h3=t '.infos'
%p %p
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter