Project

General

Profile

Defect #44348 » 0001-Fix-formatting-a-text-being-much-slower-in-7.0.0-whe.patch

Go MAEDA, 2026-08-17 16:05

View differences:

lib/redmine/wiki_formatting/common_mark/formatter.rb
75 75
          fragment = Redmine::WikiFormatting::HtmlParser.parse(html)
76 76
          SANITIZER.call(fragment)
77 77

  
78
          scrubbers = SCRUBBERS + post_processor_scrubbers
78 79
          scrubber = Loofah::Scrubber.new do |node|
79
            (SCRUBBERS + post_processor_scrubbers).each do |s|
80
            scrubbers.each do |s|
80 81
              result = s.scrub(node)
81 82
              break result if result == Loofah::Scrubber::STOP
82 83
              break if node.parent.nil?
lib/redmine/wiki_formatting/textile/formatter.rb
41 41
          html = @filter.to_html(rules)
42 42
          fragment = Loofah.html5_fragment(html)
43 43

  
44
          scrubbers = SCRUBBERS + post_processor_scrubbers
44 45
          scrubber = Loofah::Scrubber.new do |node|
45
            (SCRUBBERS + post_processor_scrubbers).each do |s|
46
            scrubbers.each do |s|
46 47
              result = s.scrub(node)
47 48
              break result if result == Loofah::Scrubber::STOP
48 49
              break if node.parent.nil?
(2-2/2)