Commit 494269fc authored by Robert Speicher's avatar Robert Speicher

Merge branch 'fix-misnamed-constant' into 'master'

Rename HTMLEntityFilter to HtmlEntityFilter to fix autoloading

See merge request !6776
parents d035f783 aac2af5b
......@@ -3,7 +3,7 @@ require 'erb'
module Banzai
module Filter
# Text filter that escapes these HTML entities: & " < >
class HTMLEntityFilter < HTML::Pipeline::TextFilter
class HtmlEntityFilter < HTML::Pipeline::TextFilter
def call
ERB::Util.html_escape(text)
end
......
......@@ -3,7 +3,7 @@ module Banzai
class SingleLinePipeline < GfmPipeline
def self.filters
@filters ||= FilterArray[
Filter::HTMLEntityFilter,
Filter::HtmlEntityFilter,
Filter::SanitizationFilter,
Filter::EmojiFilter,
......
require 'spec_helper'
describe Banzai::Filter::HTMLEntityFilter, lib: true do
describe Banzai::Filter::HtmlEntityFilter, lib: true do
include FilterSpecHelper
let(:unescaped) { 'foo <strike attr="foo">&&&</strike>' }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment