Les liens sur wikipedia sont url_encodés

This commit is contained in:
echarp 2014-06-27 12:21:09 +02:00
parent 9da68e24e5
commit 48ecbe6440
2 changed files with 3 additions and 7 deletions

View File

@ -34,11 +34,7 @@ xml.rdf :RDF, 'xmlns:rdf' => "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
content = render file: '/events/show.html', locals: { rss: true }
xml.description strip_tags content
xml.content(:encoded) {
xml.cdata! sanitize content,
tags: %w(p br table tr td ul ol li a strong b em i img),
attributes: %w(href src width height)
}
xml.content(:encoded) { xml.cdata! content }
end
end
end

View File

@ -29,8 +29,8 @@
%p
=t '.at'
%em= link_to(@event.city, "http://fr.wikipedia.org/wiki/#{@event.city}") + ','
= link_to @event.region.name, "http://fr.wikipedia.org/wiki/#{@event.region.name}" rescue nil
%em= link_to(@event.city, "http://fr.wikipedia.org/wiki/#{url_encode @event.city}") + ','
= link_to @event.region.name, "http://fr.wikipedia.org/wiki/#{url_encode @event.region.name}" rescue nil
%h3 Description
.description