Class: Zoom::SecurityProfile::UnsafeJs

Inherits:
Zoom::SecurityProfile show all
Defined in:
lib/zoom/profile/unsafe_js.rb

Instance Method Summary collapse

Constructor Details

#initialize(n = nil, o = nil, f = nil, b = nil, a = nil) ⇒ UnsafeJs

Returns a new instance of UnsafeJs.



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/zoom/profile/unsafe_js.rb', line 2

def initialize(n = nil, o = nil, f = nil, b = nil, a = nil)
    case Zoom::ProfileManager.default_profile
    when /^ack(-grep)?$/
        f ||= "--smart-case --js"
    when "ag", "pt"
        f ||= "-S -G \"\\.js$\""
    when "grep"
        f ||= "-i --include=\"*.js\""
    end

    super(n, nil, f, b, a)
    @pattern = [
        "\\.",
        "(",
        [
            "(append|eval|html)\\(",
            "innerHTML"
        ].join("|"),
        ")"
    ].join
    @taggable = true
end