Project

General

Profile

Defect #22967 » fix_for_22967-v2.diff

patch for r17346 - Go MAEDA, 2018-05-22 12:53

View differences:

app/helpers/application_helper.rb (working copy)
19 19

  
20 20
require 'forwardable'
21 21
require 'cgi'
22
require 'htmlentities'
22 23

  
23 24
module ApplicationHelper
24 25
  include Redmine::WikiFormatting::Macros::Definitions
......
740 741
      link_project = project
741 742
      esc, all, page, title = $1, $2, $3, $5
742 743
      if esc.nil?
744
        page = decode_html_entities(page)
743 745
        if page =~ /^\#(.+)$/
744 746
          anchor = sanitize_anchor_name($1)
745 747
          url = "##{anchor}"
......
1526 1528
    name = identifier.gsub(%r{^"(.*)"$}, "\\1")
1527 1529
    return CGI.unescapeHTML(name)
1528 1530
  end
1531

  
1532
  def decode_html_entities(page)
1533
    @coder ||= HTMLEntities.new()
1534
    @coder.decode(page)
1535
  end
1529 1536
end
(6-6/6)