diff options
Diffstat (limited to 'lib/redmine/wiki_formatting/html_parser.rb')
-rw-r--r-- | lib/redmine/wiki_formatting/html_parser.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/redmine/wiki_formatting/html_parser.rb b/lib/redmine/wiki_formatting/html_parser.rb index be01ca339..aa4891ce0 100644 --- a/lib/redmine/wiki_formatting/html_parser.rb +++ b/lib/redmine/wiki_formatting/html_parser.rb @@ -31,11 +31,11 @@ module Redmine def self.to_text(html) html = html.gsub(/[\n\r]/, '').squeeze(' ') - + doc = Loofah.document(html) doc.scrub!(WikiTags.new(tags)) doc.scrub!(:newline_block_elements) - + Loofah.remove_extraneous_whitespace(doc.text).strip end @@ -44,7 +44,7 @@ module Redmine @direction = :bottom_up @tags_to_text = tags_to_text || {} end - + def scrub(node) formatting = @tags_to_text[node.name] case formatting |