Project

General

Profile

Defect #10413 » 0001-Fix-6991-ampersand-in-pagename.patch

Alexander Oryol, 2012-05-17 13:23

View differences:

app/helpers/application_helper.rb
text.gsub!(/(!)?(\[\[([^\]\n\|]+)(\|([^\]\n\|]+))?\]\])/) do |m|
link_project = project
esc, all, page, title = $1, $2, $3, $5
page.gsub!(/&/, '&')
if esc.nil?
if page =~ /^([^\:]+)\:(.*)$/
link_project = Project.find_by_identifier($1) || Project.find_by_name($1)
(1-1/2)