Class: HTMLEntities::Encoder

Inherits:
Object
  • Object
show all
Defined in:
lib/sanitizer/htmlentries.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#basic_entity_regexpObject



3
4
5
6
7
8
9
10
11
12
# File 'lib/sanitizer/htmlentries.rb', line 3

def basic_entity_regexp
  @basic_entity_regexp ||= (
    case @flavor
    when /^html/
      /[<>"]|(\&(?!\w))/
    else
      /[<>'"]|(\&(?!\w))/
    end
  )
end