packwerk 3.1.0 → 3.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/packwerk/checker.rb +5 -5
- data/lib/packwerk/commands/check_command.rb +4 -2
- data/lib/packwerk/file_processor.rb +1 -1
- data/lib/packwerk/generators/templates/package.yml +2 -2
- data/lib/packwerk/offenses_formatter.rb +3 -3
- data/lib/packwerk/package_todo.rb +1 -4
- data/lib/packwerk/parsers/factory.rb +3 -3
- data/lib/packwerk/parsers/ruby.rb +9 -2
- data/lib/packwerk/reference_checking/checkers/dependency_checker.rb +3 -3
- data/lib/packwerk/reference_offense.rb +1 -1
- data/lib/packwerk/validator.rb +3 -3
- data/lib/packwerk/version.rb +1 -1
- data/sorbet/rbi/gems/actionpack@7.0.3.1.rbi +3280 -3450
- data/sorbet/rbi/gems/actionview@7.0.3.1.rbi +2322 -1782
- data/sorbet/rbi/gems/activesupport@7.0.3.1.rbi +2654 -3268
- data/sorbet/rbi/gems/ast@2.4.2.rbi +535 -6
- data/sorbet/rbi/gems/better_html@2.0.1.rbi +529 -0
- data/sorbet/rbi/gems/builder@3.2.4.rbi +4 -4
- data/sorbet/rbi/gems/byebug@11.1.3.rbi +32 -4
- data/sorbet/rbi/gems/concurrent-ruby@1.1.10.rbi +1750 -1840
- data/sorbet/rbi/gems/constant_resolver@0.2.0.rbi +15 -15
- data/sorbet/rbi/gems/crass@1.0.6.rbi +489 -5
- data/sorbet/rbi/gems/erubi@1.11.0.rbi +24 -21
- data/sorbet/rbi/gems/i18n@1.12.0.rbi +395 -395
- data/sorbet/rbi/gems/json@2.6.2.rbi +70 -77
- data/sorbet/rbi/gems/language_server-protocol@3.16.0.3.rbi +1 -1
- data/sorbet/rbi/gems/loofah@2.18.0.rbi +134 -134
- data/sorbet/rbi/gems/m@1.6.0.rbi +60 -60
- data/sorbet/rbi/gems/method_source@1.1.0.rbi +303 -0
- data/sorbet/rbi/gems/minitest-focus@1.3.1.rbi +22 -28
- data/sorbet/rbi/gems/minitest@5.16.2.rbi +384 -396
- data/sorbet/rbi/gems/mocha@1.14.0.rbi +589 -589
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +37 -32
- data/sorbet/rbi/gems/{nokogiri@1.13.8.rbi → nokogiri@1.15.3.rbi} +1869 -1030
- data/sorbet/rbi/gems/{parallel@1.22.1.rbi → parallel@1.24.0.rbi} +85 -82
- data/sorbet/rbi/gems/{parser@3.2.2.0.rbi → parser@3.3.1.0.rbi} +1679 -1609
- data/sorbet/rbi/gems/prettier_print@0.1.0.rbi +1 -1
- data/sorbet/rbi/gems/prism@0.27.0.rbi +36983 -0
- data/sorbet/rbi/gems/{racc@1.6.0.rbi → racc@1.7.1.rbi} +42 -33
- data/sorbet/rbi/gems/rack-test@2.0.2.rbi +148 -338
- data/sorbet/rbi/gems/rack@2.2.4.rbi +1079 -1130
- data/sorbet/rbi/gems/rails-dom-testing@2.0.3.rbi +354 -22
- data/sorbet/rbi/gems/rails-html-sanitizer@1.4.3.rbi +113 -259
- data/sorbet/rbi/gems/railties@7.0.3.1.rbi +642 -638
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +109 -99
- data/sorbet/rbi/gems/rake@13.0.6.rbi +714 -599
- data/sorbet/rbi/gems/{rbi@0.0.15.rbi → rbi@0.1.12.rbi} +865 -801
- data/sorbet/rbi/gems/regexp_parser@2.5.0.rbi +853 -870
- data/sorbet/rbi/gems/rexml@3.2.5.rbi +480 -477
- data/sorbet/rbi/gems/rubocop-ast@1.21.0.rbi +1621 -1622
- data/sorbet/rbi/gems/rubocop-performance@1.14.3.rbi +507 -526
- data/sorbet/rbi/gems/rubocop-shopify@2.9.0.rbi +1 -1
- data/sorbet/rbi/gems/rubocop-sorbet@0.6.11.rbi +186 -203
- data/sorbet/rbi/gems/rubocop@1.34.1.rbi +8126 -8367
- data/sorbet/rbi/gems/{ruby-lsp@0.2.1.rbi → ruby-lsp@0.2.3.rbi} +2 -2
- data/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +1235 -4
- data/sorbet/rbi/gems/smart_properties@1.17.0.rbi +90 -90
- data/sorbet/rbi/gems/spoom@1.3.2.rbi +4420 -0
- data/sorbet/rbi/gems/spring@4.0.0.rbi +104 -104
- data/sorbet/rbi/gems/syntax_tree@3.3.0.rbi +1 -1
- data/sorbet/rbi/gems/{tapioca@0.9.2.rbi → tapioca@0.13.3.rbi} +1596 -1253
- data/sorbet/rbi/gems/{thor@1.2.1.rbi → thor@1.3.1.rbi} +1047 -652
- data/sorbet/rbi/gems/tzinfo@2.0.5.rbi +531 -513
- data/sorbet/rbi/gems/unicode-display_width@2.2.0.rbi +13 -13
- data/sorbet/rbi/gems/{yard-sorbet@0.6.1.rbi → yard-sorbet@0.8.1.rbi} +132 -92
- data/sorbet/rbi/gems/{yard@0.9.28.rbi → yard@0.9.36.rbi} +3158 -3067
- data/sorbet/rbi/gems/zeitwerk@2.6.4.rbi +149 -145
- metadata +31 -74
- data/.github/ISSUE_TEMPLATE/bug_report.md +0 -27
- data/.github/pull_request_template.md +0 -28
- data/.github/workflows/ci.yml +0 -93
- data/.github/workflows/cla.yml +0 -22
- data/.gitignore +0 -13
- data/.rubocop.yml +0 -75
- data/.ruby-version +0 -1
- data/CODEOWNERS +0 -1
- data/CODE_OF_CONDUCT.md +0 -76
- data/CONTRIBUTING.md +0 -17
- data/Gemfile +0 -27
- data/Gemfile.lock +0 -206
- data/RESOLVING_VIOLATIONS.md +0 -76
- data/Rakefile +0 -22
- data/TROUBLESHOOT.md +0 -44
- data/UPGRADING.md +0 -66
- data/USAGE.md +0 -365
- data/bin/console +0 -15
- data/bin/m +0 -29
- data/bin/rake +0 -29
- data/bin/rubocop +0 -29
- data/bin/setup +0 -8
- data/bin/srb +0 -29
- data/bin/tapioca +0 -29
- data/dev.yml +0 -32
- data/docs/cohesion.png +0 -0
- data/gemfiles/Gemfile-rails-6-0 +0 -22
- data/gemfiles/Gemfile-rails-6-1 +0 -22
- data/packwerk.gemspec +0 -58
- data/shipit.rubygems.yml +0 -5
- data/sorbet/rbi/gems/actioncable@7.0.3.1.rbi +0 -2754
- data/sorbet/rbi/gems/actionmailbox@7.0.3.1.rbi +0 -1496
- data/sorbet/rbi/gems/actionmailer@7.0.3.1.rbi +0 -2362
- data/sorbet/rbi/gems/actiontext@7.0.3.1.rbi +0 -1569
- data/sorbet/rbi/gems/activejob@7.0.3.1.rbi +0 -2553
- data/sorbet/rbi/gems/activemodel@7.0.3.1.rbi +0 -5999
- data/sorbet/rbi/gems/activerecord@7.0.3.1.rbi +0 -37832
- data/sorbet/rbi/gems/activestorage@7.0.3.1.rbi +0 -2321
- data/sorbet/rbi/gems/better_html@1.0.16.rbi +0 -317
- data/sorbet/rbi/gems/coderay@1.1.3.rbi +0 -8
- data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +0 -1079
- data/sorbet/rbi/gems/digest@3.1.0.rbi +0 -189
- data/sorbet/rbi/gems/globalid@1.0.0.rbi +0 -572
- data/sorbet/rbi/gems/mail@2.7.1.rbi +0 -2490
- data/sorbet/rbi/gems/marcel@1.0.2.rbi +0 -220
- data/sorbet/rbi/gems/method_source@1.0.0.rbi +0 -76
- data/sorbet/rbi/gems/mini_mime@1.1.2.rbi +0 -170
- data/sorbet/rbi/gems/net-imap@0.2.3.rbi +0 -2147
- data/sorbet/rbi/gems/net-pop@0.1.1.rbi +0 -926
- data/sorbet/rbi/gems/net-protocol@0.1.3.rbi +0 -11
- data/sorbet/rbi/gems/net-smtp@0.3.1.rbi +0 -1108
- data/sorbet/rbi/gems/nio4r@2.5.8.rbi +0 -292
- data/sorbet/rbi/gems/pry@0.14.1.rbi +0 -8
- data/sorbet/rbi/gems/rails@7.0.3.1.rbi +0 -8
- data/sorbet/rbi/gems/spoom@1.1.11.rbi +0 -2181
- data/sorbet/rbi/gems/strscan@3.0.4.rbi +0 -8
- data/sorbet/rbi/gems/timeout@0.3.0.rbi +0 -142
- data/sorbet/rbi/gems/unparser@0.6.5.rbi +0 -4529
- data/sorbet/rbi/gems/webrick@1.7.0.rbi +0 -2582
- data/sorbet/rbi/gems/websocket-driver@0.7.5.rbi +0 -993
- data/sorbet/rbi/gems/websocket-extensions@0.1.5.rbi +0 -71
@@ -12,56 +12,56 @@
|
|
12
12
|
# +close+. Which makes it particularly easy to sanitize mass
|
13
13
|
# quantities of docs.
|
14
14
|
#
|
15
|
-
# source://loofah
|
15
|
+
# source://loofah//lib/loofah/version.rb#2
|
16
16
|
module Loofah
|
17
17
|
class << self
|
18
18
|
# Shortcut for Loofah::HTML::Document.parse
|
19
19
|
# This method accepts the same parameters as Nokogiri::HTML::Document.parse
|
20
20
|
#
|
21
|
-
# source://loofah
|
21
|
+
# source://loofah//lib/loofah.rb#35
|
22
22
|
def document(*args, &block); end
|
23
23
|
|
24
24
|
# Shortcut for Loofah::HTML::DocumentFragment.parse
|
25
25
|
# This method accepts the same parameters as Nokogiri::HTML::DocumentFragment.parse
|
26
26
|
#
|
27
|
-
# source://loofah
|
27
|
+
# source://loofah//lib/loofah.rb#41
|
28
28
|
def fragment(*args, &block); end
|
29
29
|
|
30
30
|
# A helper to remove extraneous whitespace from text-ified HTML
|
31
31
|
#
|
32
|
-
# source://loofah
|
32
|
+
# source://loofah//lib/loofah.rb#78
|
33
33
|
def remove_extraneous_whitespace(string); end
|
34
34
|
|
35
35
|
# Shortcut for Loofah.document(string_or_io).scrub!(method)
|
36
36
|
#
|
37
|
-
# source://loofah
|
37
|
+
# source://loofah//lib/loofah.rb#51
|
38
38
|
def scrub_document(string_or_io, method); end
|
39
39
|
|
40
40
|
# Shortcut for Loofah.fragment(string_or_io).scrub!(method)
|
41
41
|
#
|
42
|
-
# source://loofah
|
42
|
+
# source://loofah//lib/loofah.rb#46
|
43
43
|
def scrub_fragment(string_or_io, method); end
|
44
44
|
|
45
45
|
# Shortcut for Loofah.xml_document(string_or_io).scrub!(method)
|
46
46
|
#
|
47
|
-
# source://loofah
|
47
|
+
# source://loofah//lib/loofah.rb#73
|
48
48
|
def scrub_xml_document(string_or_io, method); end
|
49
49
|
|
50
50
|
# Shortcut for Loofah.xml_fragment(string_or_io).scrub!(method)
|
51
51
|
#
|
52
|
-
# source://loofah
|
52
|
+
# source://loofah//lib/loofah.rb#68
|
53
53
|
def scrub_xml_fragment(string_or_io, method); end
|
54
54
|
|
55
55
|
# Shortcut for Loofah::XML::Document.parse
|
56
56
|
# This method accepts the same parameters as Nokogiri::XML::Document.parse
|
57
57
|
#
|
58
|
-
# source://loofah
|
58
|
+
# source://loofah//lib/loofah.rb#57
|
59
59
|
def xml_document(*args, &block); end
|
60
60
|
|
61
61
|
# Shortcut for Loofah::XML::DocumentFragment.parse
|
62
62
|
# This method accepts the same parameters as Nokogiri::XML::DocumentFragment.parse
|
63
63
|
#
|
64
|
-
# source://loofah
|
64
|
+
# source://loofah//lib/loofah.rb#63
|
65
65
|
def xml_fragment(*args, &block); end
|
66
66
|
|
67
67
|
private
|
@@ -76,214 +76,214 @@ module Loofah
|
|
76
76
|
# the contract that scrubbers expect of a node (e.g., it can be
|
77
77
|
# replaced, sibling and children nodes can be created).
|
78
78
|
#
|
79
|
-
# source://loofah
|
79
|
+
# source://loofah//lib/loofah.rb#93
|
80
80
|
def remove_comments_before_html_element(doc); end
|
81
81
|
end
|
82
82
|
end
|
83
83
|
|
84
|
-
# source://loofah
|
84
|
+
# source://loofah//lib/loofah/instance_methods.rb#126
|
85
85
|
module Loofah::DocumentDecorator
|
86
|
-
# source://loofah
|
86
|
+
# source://loofah//lib/loofah/instance_methods.rb#127
|
87
87
|
def initialize(*args, &block); end
|
88
88
|
end
|
89
89
|
|
90
|
-
# source://loofah
|
90
|
+
# source://loofah//lib/loofah/elements.rb#5
|
91
91
|
module Loofah::Elements; end
|
92
92
|
|
93
|
-
# source://loofah
|
93
|
+
# source://loofah//lib/loofah/elements.rb#91
|
94
94
|
Loofah::Elements::BLOCK_LEVEL = T.let(T.unsafe(nil), Set)
|
95
95
|
|
96
96
|
# Elements that aren't block but should generate a newline in #to_text
|
97
97
|
#
|
98
|
-
# source://loofah
|
98
|
+
# source://loofah//lib/loofah/elements.rb#88
|
99
99
|
Loofah::Elements::INLINE_LINE_BREAK = T.let(T.unsafe(nil), Set)
|
100
100
|
|
101
|
-
# source://loofah
|
101
|
+
# source://loofah//lib/loofah/elements.rb#92
|
102
102
|
Loofah::Elements::LINEBREAKERS = T.let(T.unsafe(nil), Set)
|
103
103
|
|
104
104
|
# The following elements may also be considered block-level
|
105
105
|
# elements since they may contain block-level elements
|
106
106
|
#
|
107
|
-
# source://loofah
|
107
|
+
# source://loofah//lib/loofah/elements.rb#75
|
108
108
|
Loofah::Elements::LOOSE_BLOCK_LEVEL = T.let(T.unsafe(nil), Set)
|
109
109
|
|
110
|
-
# source://loofah
|
110
|
+
# source://loofah//lib/loofah/elements.rb#90
|
111
111
|
Loofah::Elements::STRICT_BLOCK_LEVEL = T.let(T.unsafe(nil), Set)
|
112
112
|
|
113
|
-
# source://loofah
|
113
|
+
# source://loofah//lib/loofah/elements.rb#6
|
114
114
|
Loofah::Elements::STRICT_BLOCK_LEVEL_HTML4 = T.let(T.unsafe(nil), Set)
|
115
115
|
|
116
116
|
# https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements
|
117
117
|
#
|
118
|
-
# source://loofah
|
118
|
+
# source://loofah//lib/loofah/elements.rb#34
|
119
119
|
Loofah::Elements::STRICT_BLOCK_LEVEL_HTML5 = T.let(T.unsafe(nil), Set)
|
120
120
|
|
121
|
-
# source://loofah
|
121
|
+
# source://loofah//lib/loofah/html/document.rb#3
|
122
122
|
module Loofah::HTML; end
|
123
123
|
|
124
|
-
# source://loofah
|
124
|
+
# source://loofah//lib/loofah/html5/safelist.rb#5
|
125
125
|
module Loofah::HTML5; end
|
126
126
|
|
127
|
-
# source://loofah
|
127
|
+
# source://loofah//lib/loofah/html5/safelist.rb#48
|
128
128
|
module Loofah::HTML5::SafeList; end
|
129
129
|
|
130
|
-
# source://loofah
|
130
|
+
# source://loofah//lib/loofah/html5/safelist.rb#226
|
131
131
|
Loofah::HTML5::SafeList::ACCEPTABLE_ATTRIBUTES = T.let(T.unsafe(nil), Set)
|
132
132
|
|
133
133
|
# see https://www.quackit.com/css/functions/
|
134
134
|
# omit `url` and `image` from that list
|
135
135
|
#
|
136
|
-
# source://loofah
|
136
|
+
# source://loofah//lib/loofah/html5/safelist.rb#742
|
137
137
|
Loofah::HTML5::SafeList::ACCEPTABLE_CSS_FUNCTIONS = T.let(T.unsafe(nil), Set)
|
138
138
|
|
139
|
-
# source://loofah
|
139
|
+
# source://loofah//lib/loofah/html5/safelist.rb#685
|
140
140
|
Loofah::HTML5::SafeList::ACCEPTABLE_CSS_KEYWORDS = T.let(T.unsafe(nil), Set)
|
141
141
|
|
142
|
-
# source://loofah
|
142
|
+
# source://loofah//lib/loofah/html5/safelist.rb#615
|
143
143
|
Loofah::HTML5::SafeList::ACCEPTABLE_CSS_PROPERTIES = T.let(T.unsafe(nil), Set)
|
144
144
|
|
145
|
-
# source://loofah
|
145
|
+
# source://loofah//lib/loofah/html5/safelist.rb#49
|
146
146
|
Loofah::HTML5::SafeList::ACCEPTABLE_ELEMENTS = T.let(T.unsafe(nil), Set)
|
147
147
|
|
148
|
-
# source://loofah
|
148
|
+
# source://loofah//lib/loofah/html5/safelist.rb#815
|
149
149
|
Loofah::HTML5::SafeList::ACCEPTABLE_PROTOCOLS = T.let(T.unsafe(nil), Set)
|
150
150
|
|
151
|
-
# source://loofah
|
151
|
+
# source://loofah//lib/loofah/html5/safelist.rb#802
|
152
152
|
Loofah::HTML5::SafeList::ACCEPTABLE_SVG_PROPERTIES = T.let(T.unsafe(nil), Set)
|
153
153
|
|
154
|
-
# source://loofah
|
154
|
+
# source://loofah//lib/loofah/html5/safelist.rb#844
|
155
155
|
Loofah::HTML5::SafeList::ACCEPTABLE_URI_DATA_MEDIATYPES = T.let(T.unsafe(nil), Set)
|
156
156
|
|
157
|
-
# source://loofah
|
157
|
+
# source://loofah//lib/loofah/html5/safelist.rb#855
|
158
158
|
Loofah::HTML5::SafeList::ALLOWED_ATTRIBUTES = T.let(T.unsafe(nil), Set)
|
159
159
|
|
160
|
-
# source://loofah
|
160
|
+
# source://loofah//lib/loofah/html5/safelist.rb#858
|
161
161
|
Loofah::HTML5::SafeList::ALLOWED_CSS_FUNCTIONS = T.let(T.unsafe(nil), Set)
|
162
162
|
|
163
|
-
# source://loofah
|
163
|
+
# source://loofah//lib/loofah/html5/safelist.rb#857
|
164
164
|
Loofah::HTML5::SafeList::ALLOWED_CSS_KEYWORDS = T.let(T.unsafe(nil), Set)
|
165
165
|
|
166
|
-
# source://loofah
|
166
|
+
# source://loofah//lib/loofah/html5/safelist.rb#856
|
167
167
|
Loofah::HTML5::SafeList::ALLOWED_CSS_PROPERTIES = T.let(T.unsafe(nil), Set)
|
168
168
|
|
169
169
|
# subclasses may define their own versions of these constants
|
170
170
|
#
|
171
|
-
# source://loofah
|
171
|
+
# source://loofah//lib/loofah/html5/safelist.rb#854
|
172
172
|
Loofah::HTML5::SafeList::ALLOWED_ELEMENTS = T.let(T.unsafe(nil), Set)
|
173
173
|
|
174
|
-
# source://loofah
|
174
|
+
# source://loofah//lib/loofah/html5/safelist.rb#879
|
175
175
|
Loofah::HTML5::SafeList::ALLOWED_ELEMENTS_WITH_LIBXML2 = T.let(T.unsafe(nil), Set)
|
176
176
|
|
177
|
-
# source://loofah
|
177
|
+
# source://loofah//lib/loofah/html5/safelist.rb#860
|
178
178
|
Loofah::HTML5::SafeList::ALLOWED_PROTOCOLS = T.let(T.unsafe(nil), Set)
|
179
179
|
|
180
|
-
# source://loofah
|
180
|
+
# source://loofah//lib/loofah/html5/safelist.rb#859
|
181
181
|
Loofah::HTML5::SafeList::ALLOWED_SVG_PROPERTIES = T.let(T.unsafe(nil), Set)
|
182
182
|
|
183
|
-
# source://loofah
|
183
|
+
# source://loofah//lib/loofah/html5/safelist.rb#861
|
184
184
|
Loofah::HTML5::SafeList::ALLOWED_URI_DATA_MEDIATYPES = T.let(T.unsafe(nil), Set)
|
185
185
|
|
186
|
-
# source://loofah
|
186
|
+
# source://loofah//lib/loofah/html5/safelist.rb#515
|
187
187
|
Loofah::HTML5::SafeList::ARIA_ATTRIBUTES = T.let(T.unsafe(nil), Set)
|
188
188
|
|
189
|
-
# source://loofah
|
189
|
+
# source://loofah//lib/loofah/html5/safelist.rb#571
|
190
190
|
Loofah::HTML5::SafeList::ATTR_VAL_IS_URI = T.let(T.unsafe(nil), Set)
|
191
191
|
|
192
|
-
# source://loofah
|
192
|
+
# source://loofah//lib/loofah/html5/safelist.rb#309
|
193
193
|
Loofah::HTML5::SafeList::MATHML_ATTRIBUTES = T.let(T.unsafe(nil), Set)
|
194
194
|
|
195
|
-
# source://loofah
|
195
|
+
# source://loofah//lib/loofah/html5/safelist.rb#146
|
196
196
|
Loofah::HTML5::SafeList::MATHML_ELEMENTS = T.let(T.unsafe(nil), Set)
|
197
197
|
|
198
|
-
# source://loofah
|
198
|
+
# source://loofah//lib/loofah/html5/safelist.rb#813
|
199
199
|
Loofah::HTML5::SafeList::PROTOCOL_SEPARATOR = T.let(T.unsafe(nil), Regexp)
|
200
200
|
|
201
|
-
# source://loofah
|
201
|
+
# source://loofah//lib/loofah/html5/safelist.rb#795
|
202
202
|
Loofah::HTML5::SafeList::SHORTHAND_CSS_PROPERTIES = T.let(T.unsafe(nil), Set)
|
203
203
|
|
204
|
-
# source://loofah
|
204
|
+
# source://loofah//lib/loofah/html5/safelist.rb#597
|
205
205
|
Loofah::HTML5::SafeList::SVG_ALLOW_LOCAL_HREF = T.let(T.unsafe(nil), Set)
|
206
206
|
|
207
|
-
# source://loofah
|
207
|
+
# source://loofah//lib/loofah/html5/safelist.rb#361
|
208
208
|
Loofah::HTML5::SafeList::SVG_ATTRIBUTES = T.let(T.unsafe(nil), Set)
|
209
209
|
|
210
|
-
# source://loofah
|
210
|
+
# source://loofah//lib/loofah/html5/safelist.rb#583
|
211
211
|
Loofah::HTML5::SafeList::SVG_ATTR_VAL_ALLOWS_REF = T.let(T.unsafe(nil), Set)
|
212
212
|
|
213
|
-
# source://loofah
|
213
|
+
# source://loofah//lib/loofah/html5/safelist.rb#182
|
214
214
|
Loofah::HTML5::SafeList::SVG_ELEMENTS = T.let(T.unsafe(nil), Set)
|
215
215
|
|
216
216
|
# additional tags we should consider safe since we have libxml2 fixing up our documents.
|
217
217
|
#
|
218
|
-
# source://loofah
|
218
|
+
# source://loofah//lib/loofah/html5/safelist.rb#874
|
219
219
|
Loofah::HTML5::SafeList::TAGS_SAFE_WITH_LIBXML2 = T.let(T.unsafe(nil), Set)
|
220
220
|
|
221
221
|
# TODO: remove VOID_ELEMENTS in a future major release
|
222
222
|
# and put it in the tests (it is used only for testing, not for functional behavior)
|
223
223
|
#
|
224
|
-
# source://loofah
|
224
|
+
# source://loofah//lib/loofah/html5/safelist.rb#865
|
225
225
|
Loofah::HTML5::SafeList::VOID_ELEMENTS = T.let(T.unsafe(nil), Set)
|
226
226
|
|
227
|
-
# source://loofah
|
227
|
+
# source://loofah//lib/loofah/html5/scrub.rb#7
|
228
228
|
module Loofah::HTML5::Scrub
|
229
229
|
class << self
|
230
230
|
# @return [Boolean]
|
231
231
|
#
|
232
|
-
# source://loofah
|
232
|
+
# source://loofah//lib/loofah/html5/scrub.rb#16
|
233
233
|
def allowed_element?(element_name); end
|
234
234
|
|
235
235
|
# libxml2 >= 2.9.2 fails to escape comments within some attributes.
|
236
236
|
#
|
237
237
|
# see comments about CVE-2018-8048 within the tests for more information
|
238
238
|
#
|
239
|
-
# source://loofah
|
239
|
+
# source://loofah//lib/loofah/html5/scrub.rb#135
|
240
240
|
def force_correct_attribute_escaping!(node); end
|
241
241
|
|
242
242
|
# alternative implementation of the html5lib attribute scrubbing algorithm
|
243
243
|
#
|
244
|
-
# source://loofah
|
244
|
+
# source://loofah//lib/loofah/html5/scrub.rb#21
|
245
245
|
def scrub_attributes(node); end
|
246
246
|
|
247
|
-
# source://loofah
|
247
|
+
# source://loofah//lib/loofah/html5/scrub.rb#79
|
248
248
|
def scrub_css(style); end
|
249
249
|
|
250
|
-
# source://loofah
|
250
|
+
# source://loofah//lib/loofah/html5/scrub.rb#74
|
251
251
|
def scrub_css_attribute(node); end
|
252
252
|
end
|
253
253
|
end
|
254
254
|
|
255
|
-
# source://loofah
|
255
|
+
# source://loofah//lib/loofah/html5/scrub.rb#8
|
256
256
|
Loofah::HTML5::Scrub::CONTROL_CHARACTERS = T.let(T.unsafe(nil), Regexp)
|
257
257
|
|
258
|
-
# source://loofah
|
258
|
+
# source://loofah//lib/loofah/html5/scrub.rb#10
|
259
259
|
Loofah::HTML5::Scrub::CRASS_SEMICOLON = T.let(T.unsafe(nil), Hash)
|
260
260
|
|
261
|
-
# source://loofah
|
261
|
+
# source://loofah//lib/loofah/html5/scrub.rb#11
|
262
262
|
Loofah::HTML5::Scrub::CSS_IMPORTANT = T.let(T.unsafe(nil), String)
|
263
263
|
|
264
|
-
# source://loofah
|
264
|
+
# source://loofah//lib/loofah/html5/scrub.rb#9
|
265
265
|
Loofah::HTML5::Scrub::CSS_KEYWORDISH = T.let(T.unsafe(nil), Regexp)
|
266
266
|
|
267
|
-
# source://loofah
|
267
|
+
# source://loofah//lib/loofah/html5/scrub.rb#12
|
268
268
|
Loofah::HTML5::Scrub::CSS_PROPERTY_STRING_WITHOUT_EMBEDDED_QUOTES = T.let(T.unsafe(nil), Regexp)
|
269
269
|
|
270
|
-
# source://loofah
|
270
|
+
# source://loofah//lib/loofah/html5/scrub.rb#13
|
271
271
|
Loofah::HTML5::Scrub::DATA_ATTRIBUTE_NAME = T.let(T.unsafe(nil), Regexp)
|
272
272
|
|
273
|
-
# source://loofah
|
273
|
+
# source://loofah//lib/loofah/html5/safelist.rb#882
|
274
274
|
Loofah::HTML5::WhiteList = Loofah::HTML5::SafeList
|
275
275
|
|
276
276
|
# Subclass of Nokogiri::HTML::Document.
|
277
277
|
#
|
278
278
|
# See Loofah::ScrubBehavior and Loofah::TextBehavior for additional methods.
|
279
279
|
#
|
280
|
-
# source://loofah
|
280
|
+
# source://loofah//lib/loofah/html/document.rb#9
|
281
281
|
class Loofah::HTML::Document < ::Nokogiri::HTML4::Document
|
282
282
|
include ::Loofah::ScrubBehavior::Node
|
283
283
|
include ::Loofah::DocumentDecorator
|
284
284
|
include ::Loofah::TextBehavior
|
285
285
|
|
286
|
-
# source://loofah
|
286
|
+
# source://loofah//lib/loofah/html/document.rb#14
|
287
287
|
def serialize_root; end
|
288
288
|
end
|
289
289
|
|
@@ -291,21 +291,21 @@ end
|
|
291
291
|
#
|
292
292
|
# See Loofah::ScrubBehavior and Loofah::TextBehavior for additional methods.
|
293
293
|
#
|
294
|
-
# source://loofah
|
294
|
+
# source://loofah//lib/loofah/html/document_fragment.rb#9
|
295
295
|
class Loofah::HTML::DocumentFragment < ::Nokogiri::HTML4::DocumentFragment
|
296
296
|
include ::Loofah::TextBehavior
|
297
297
|
|
298
298
|
# Returns the HTML markup contained by the fragment
|
299
299
|
#
|
300
|
-
# source://loofah
|
300
|
+
# source://loofah//lib/loofah/html/document_fragment.rb#31
|
301
301
|
def serialize; end
|
302
302
|
|
303
|
-
# source://loofah
|
303
|
+
# source://loofah//lib/loofah/html/document_fragment.rb#37
|
304
304
|
def serialize_root; end
|
305
305
|
|
306
306
|
# Returns the HTML markup contained by the fragment
|
307
307
|
#
|
308
|
-
# source://loofah
|
308
|
+
# source://loofah//lib/loofah/html/document_fragment.rb#31
|
309
309
|
def to_s; end
|
310
310
|
|
311
311
|
class << self
|
@@ -313,7 +313,7 @@ class Loofah::HTML::DocumentFragment < ::Nokogiri::HTML4::DocumentFragment
|
|
313
313
|
# constructor. Applications should use Loofah.fragment to
|
314
314
|
# parse a fragment.
|
315
315
|
#
|
316
|
-
# source://loofah
|
316
|
+
# source://loofah//lib/loofah/html/document_fragment.rb#18
|
317
317
|
def parse(tags, encoding = T.unsafe(nil)); end
|
318
318
|
end
|
319
319
|
end
|
@@ -322,7 +322,7 @@ end
|
|
322
322
|
#
|
323
323
|
# ಠ_ಠ
|
324
324
|
#
|
325
|
-
# source://loofah
|
325
|
+
# source://loofah//lib/loofah/html5/libxml2_workarounds.rb#11
|
326
326
|
module Loofah::LibxmlWorkarounds; end
|
327
327
|
|
328
328
|
# these attributes and qualifying parent tags are determined by the code at:
|
@@ -331,16 +331,16 @@ module Loofah::LibxmlWorkarounds; end
|
|
331
331
|
#
|
332
332
|
# see comments about CVE-2018-8048 within the tests for more information
|
333
333
|
#
|
334
|
-
# source://loofah
|
334
|
+
# source://loofah//lib/loofah/html5/libxml2_workarounds.rb#19
|
335
335
|
Loofah::LibxmlWorkarounds::BROKEN_ESCAPING_ATTRIBUTES = T.let(T.unsafe(nil), Set)
|
336
336
|
|
337
|
-
# source://loofah
|
337
|
+
# source://loofah//lib/loofah/html5/libxml2_workarounds.rb#25
|
338
338
|
Loofah::LibxmlWorkarounds::BROKEN_ESCAPING_ATTRIBUTES_QUALIFYING_TAG = T.let(T.unsafe(nil), Hash)
|
339
339
|
|
340
|
-
# source://loofah
|
340
|
+
# source://loofah//lib/loofah/metahelpers.rb#3
|
341
341
|
module Loofah::MetaHelpers
|
342
342
|
class << self
|
343
|
-
# source://loofah
|
343
|
+
# source://loofah//lib/loofah/metahelpers.rb#4
|
344
344
|
def add_downcased_set_members_to_all_set_constants(mojule); end
|
345
345
|
end
|
346
346
|
end
|
@@ -371,23 +371,23 @@ end
|
|
371
371
|
# Please see Scrubber for more information on implementation and traversal, and
|
372
372
|
# README.rdoc for more example usage.
|
373
373
|
#
|
374
|
-
# source://loofah
|
374
|
+
# source://loofah//lib/loofah/instance_methods.rb#30
|
375
375
|
module Loofah::ScrubBehavior
|
376
376
|
class << self
|
377
|
-
# source://loofah
|
377
|
+
# source://loofah//lib/loofah/instance_methods.rb#60
|
378
378
|
def resolve_scrubber(scrubber); end
|
379
379
|
end
|
380
380
|
end
|
381
381
|
|
382
|
-
# source://loofah
|
382
|
+
# source://loofah//lib/loofah/instance_methods.rb#31
|
383
383
|
module Loofah::ScrubBehavior::Node
|
384
|
-
# source://loofah
|
384
|
+
# source://loofah//lib/loofah/instance_methods.rb#32
|
385
385
|
def scrub!(scrubber); end
|
386
386
|
end
|
387
387
|
|
388
|
-
# source://loofah
|
388
|
+
# source://loofah//lib/loofah/instance_methods.rb#53
|
389
389
|
module Loofah::ScrubBehavior::NodeSet
|
390
|
-
# source://loofah
|
390
|
+
# source://loofah//lib/loofah/instance_methods.rb#54
|
391
391
|
def scrub!(scrubber); end
|
392
392
|
end
|
393
393
|
|
@@ -416,7 +416,7 @@ end
|
|
416
416
|
# default) or bottom-up. Top-down scrubbers can optionally return
|
417
417
|
# Scrubber::STOP to terminate the traversal of a subtree.
|
418
418
|
#
|
419
|
-
# source://loofah
|
419
|
+
# source://loofah//lib/loofah/scrubber.rb#34
|
420
420
|
class Loofah::Scrubber
|
421
421
|
# Options may include
|
422
422
|
# :direction => :top_down (the default)
|
@@ -433,26 +433,26 @@ class Loofah::Scrubber
|
|
433
433
|
#
|
434
434
|
# @return [Scrubber] a new instance of Scrubber
|
435
435
|
#
|
436
|
-
# source://loofah
|
436
|
+
# source://loofah//lib/loofah/scrubber.rb#65
|
437
437
|
def initialize(options = T.unsafe(nil), &block); end
|
438
438
|
|
439
439
|
# If the attribute is not set, add it
|
440
440
|
# If the attribute is set, don't overwrite the existing value
|
441
441
|
#
|
442
|
-
# source://loofah
|
442
|
+
# source://loofah//lib/loofah/scrubber.rb#94
|
443
443
|
def append_attribute(node, attribute, value); end
|
444
444
|
|
445
445
|
# When a scrubber is initialized, the optional block is saved as
|
446
446
|
# :block. Note that, if no block is passed, then the +scrub+
|
447
447
|
# method is assumed to have been implemented.
|
448
448
|
#
|
449
|
-
# source://loofah
|
449
|
+
# source://loofah//lib/loofah/scrubber.rb#49
|
450
450
|
def block; end
|
451
451
|
|
452
452
|
# When a scrubber is initialized, the :direction may be specified
|
453
453
|
# as :top_down (the default) or :bottom_up.
|
454
454
|
#
|
455
|
-
# source://loofah
|
455
|
+
# source://loofah//lib/loofah/scrubber.rb#44
|
456
456
|
def direction; end
|
457
457
|
|
458
458
|
# When +new+ is not passed a block, the class may implement
|
@@ -460,41 +460,41 @@ class Loofah::Scrubber
|
|
460
460
|
#
|
461
461
|
# @raise [ScrubberNotFound]
|
462
462
|
#
|
463
|
-
# source://loofah
|
463
|
+
# source://loofah//lib/loofah/scrubber.rb#86
|
464
464
|
def scrub(node); end
|
465
465
|
|
466
466
|
# Calling +traverse+ will cause the document to be traversed by
|
467
467
|
# either the lambda passed to the initializer or the +scrub+
|
468
468
|
# method, in the direction specified at +new+ time.
|
469
469
|
#
|
470
|
-
# source://loofah
|
470
|
+
# source://loofah//lib/loofah/scrubber.rb#78
|
471
471
|
def traverse(node); end
|
472
472
|
|
473
473
|
private
|
474
474
|
|
475
|
-
# source://loofah
|
475
|
+
# source://loofah//lib/loofah/scrubber.rb#103
|
476
476
|
def html5lib_sanitize(node); end
|
477
477
|
|
478
|
-
# source://loofah
|
478
|
+
# source://loofah//lib/loofah/scrubber.rb#125
|
479
479
|
def traverse_conditionally_bottom_up(node); end
|
480
480
|
|
481
|
-
# source://loofah
|
481
|
+
# source://loofah//lib/loofah/scrubber.rb#116
|
482
482
|
def traverse_conditionally_top_down(node); end
|
483
483
|
end
|
484
484
|
|
485
485
|
# Top-down Scrubbers may return CONTINUE to indicate that the subtree should be traversed.
|
486
486
|
#
|
487
|
-
# source://loofah
|
487
|
+
# source://loofah//lib/loofah/scrubber.rb#37
|
488
488
|
Loofah::Scrubber::CONTINUE = T.let(T.unsafe(nil), Object)
|
489
489
|
|
490
490
|
# Top-down Scrubbers may return STOP to indicate that the subtree should not be traversed.
|
491
491
|
#
|
492
|
-
# source://loofah
|
492
|
+
# source://loofah//lib/loofah/scrubber.rb#40
|
493
493
|
Loofah::Scrubber::STOP = T.let(T.unsafe(nil), Object)
|
494
494
|
|
495
495
|
# A RuntimeError raised when Loofah could not find an appropriate scrubber.
|
496
496
|
#
|
497
|
-
# source://loofah
|
497
|
+
# source://loofah//lib/loofah/scrubber.rb#6
|
498
498
|
class Loofah::ScrubberNotFound < ::RuntimeError; end
|
499
499
|
|
500
500
|
# Loofah provides some built-in scrubbers for sanitizing with
|
@@ -579,12 +579,12 @@ class Loofah::ScrubberNotFound < ::RuntimeError; end
|
|
579
579
|
#
|
580
580
|
# http://timelessrepo.com/json-isnt-a-javascript-subset
|
581
581
|
#
|
582
|
-
# source://loofah
|
582
|
+
# source://loofah//lib/loofah/scrubbers.rb#86
|
583
583
|
module Loofah::Scrubbers
|
584
584
|
class << self
|
585
585
|
# Returns an array of symbols representing the built-in scrubbers
|
586
586
|
#
|
587
|
-
# source://loofah
|
587
|
+
# source://loofah//lib/loofah/scrubbers.rb#299
|
588
588
|
def scrubber_symbols; end
|
589
589
|
end
|
590
590
|
end
|
@@ -597,32 +597,32 @@ end
|
|
597
597
|
# Loofah.fragment(unsafe_html).scrub!(:escape)
|
598
598
|
# => "ohai! <div>div is safe</div> <foo>but foo is <b>not</b></foo>"
|
599
599
|
#
|
600
|
-
# source://loofah
|
600
|
+
# source://loofah//lib/loofah/scrubbers.rb#143
|
601
601
|
class Loofah::Scrubbers::Escape < ::Loofah::Scrubber
|
602
602
|
# @return [Escape] a new instance of Escape
|
603
603
|
#
|
604
|
-
# source://loofah
|
604
|
+
# source://loofah//lib/loofah/scrubbers.rb#144
|
605
605
|
def initialize; end
|
606
606
|
|
607
|
-
# source://loofah
|
607
|
+
# source://loofah//lib/loofah/scrubbers.rb#148
|
608
608
|
def scrub(node); end
|
609
609
|
end
|
610
610
|
|
611
611
|
# A hash that maps a symbol (like +:prune+) to the appropriate Scrubber (Loofah::Scrubbers::Prune).
|
612
612
|
#
|
613
|
-
# source://loofah
|
613
|
+
# source://loofah//lib/loofah/scrubbers.rb#285
|
614
614
|
Loofah::Scrubbers::MAP = T.let(T.unsafe(nil), Hash)
|
615
615
|
|
616
616
|
# This class probably isn't useful publicly, but is used for #to_text's current implemention
|
617
617
|
#
|
618
|
-
# source://loofah
|
618
|
+
# source://loofah//lib/loofah/scrubbers.rb#237
|
619
619
|
class Loofah::Scrubbers::NewlineBlockElements < ::Loofah::Scrubber
|
620
620
|
# @return [NewlineBlockElements] a new instance of NewlineBlockElements
|
621
621
|
#
|
622
|
-
# source://loofah
|
622
|
+
# source://loofah//lib/loofah/scrubbers.rb#238
|
623
623
|
def initialize; end
|
624
624
|
|
625
|
-
# source://loofah
|
625
|
+
# source://loofah//lib/loofah/scrubbers.rb#242
|
626
626
|
def scrub(node); end
|
627
627
|
end
|
628
628
|
|
@@ -634,14 +634,14 @@ end
|
|
634
634
|
# Loofah.fragment(link_farmers_markup).scrub!(:nofollow)
|
635
635
|
# => "ohai! <a href='http://www.myswarmysite.com/' rel="nofollow">I like your blog post</a>"
|
636
636
|
#
|
637
|
-
# source://loofah
|
637
|
+
# source://loofah//lib/loofah/scrubbers.rb#203
|
638
638
|
class Loofah::Scrubbers::NoFollow < ::Loofah::Scrubber
|
639
639
|
# @return [NoFollow] a new instance of NoFollow
|
640
640
|
#
|
641
|
-
# source://loofah
|
641
|
+
# source://loofah//lib/loofah/scrubbers.rb#204
|
642
642
|
def initialize; end
|
643
643
|
|
644
|
-
# source://loofah
|
644
|
+
# source://loofah//lib/loofah/scrubbers.rb#208
|
645
645
|
def scrub(node); end
|
646
646
|
end
|
647
647
|
|
@@ -653,14 +653,14 @@ end
|
|
653
653
|
# Loofah.fragment(link_farmers_markup).scrub!(:noopener)
|
654
654
|
# => "ohai! <a href='http://www.myswarmysite.com/' rel="noopener">I like your blog post</a>"
|
655
655
|
#
|
656
|
-
# source://loofah
|
656
|
+
# source://loofah//lib/loofah/scrubbers.rb#224
|
657
657
|
class Loofah::Scrubbers::NoOpener < ::Loofah::Scrubber
|
658
658
|
# @return [NoOpener] a new instance of NoOpener
|
659
659
|
#
|
660
|
-
# source://loofah
|
660
|
+
# source://loofah//lib/loofah/scrubbers.rb#225
|
661
661
|
def initialize; end
|
662
662
|
|
663
|
-
# source://loofah
|
663
|
+
# source://loofah//lib/loofah/scrubbers.rb#229
|
664
664
|
def scrub(node); end
|
665
665
|
end
|
666
666
|
|
@@ -672,14 +672,14 @@ end
|
|
672
672
|
# Loofah.fragment(unsafe_html).scrub!(:prune)
|
673
673
|
# => "ohai! <div>div is safe</div> "
|
674
674
|
#
|
675
|
-
# source://loofah
|
675
|
+
# source://loofah//lib/loofah/scrubbers.rb#122
|
676
676
|
class Loofah::Scrubbers::Prune < ::Loofah::Scrubber
|
677
677
|
# @return [Prune] a new instance of Prune
|
678
678
|
#
|
679
|
-
# source://loofah
|
679
|
+
# source://loofah//lib/loofah/scrubbers.rb#123
|
680
680
|
def initialize; end
|
681
681
|
|
682
|
-
# source://loofah
|
682
|
+
# source://loofah//lib/loofah/scrubbers.rb#127
|
683
683
|
def scrub(node); end
|
684
684
|
end
|
685
685
|
|
@@ -691,14 +691,14 @@ end
|
|
691
691
|
# Loofah.fragment(unsafe_html).scrub!(:strip)
|
692
692
|
# => "ohai! <div>div is safe</div> but foo is <b>not</b>"
|
693
693
|
#
|
694
|
-
# source://loofah
|
694
|
+
# source://loofah//lib/loofah/scrubbers.rb#96
|
695
695
|
class Loofah::Scrubbers::Strip < ::Loofah::Scrubber
|
696
696
|
# @return [Strip] a new instance of Strip
|
697
697
|
#
|
698
|
-
# source://loofah
|
698
|
+
# source://loofah//lib/loofah/scrubbers.rb#97
|
699
699
|
def initialize; end
|
700
700
|
|
701
|
-
# source://loofah
|
701
|
+
# source://loofah//lib/loofah/scrubbers.rb#101
|
702
702
|
def scrub(node); end
|
703
703
|
end
|
704
704
|
|
@@ -716,14 +716,14 @@ end
|
|
716
716
|
#
|
717
717
|
# http://timelessrepo.com/json-isnt-a-javascript-subset
|
718
718
|
#
|
719
|
-
# source://loofah
|
719
|
+
# source://loofah//lib/loofah/scrubbers.rb#269
|
720
720
|
class Loofah::Scrubbers::Unprintable < ::Loofah::Scrubber
|
721
721
|
# @return [Unprintable] a new instance of Unprintable
|
722
722
|
#
|
723
|
-
# source://loofah
|
723
|
+
# source://loofah//lib/loofah/scrubbers.rb#270
|
724
724
|
def initialize; end
|
725
725
|
|
726
|
-
# source://loofah
|
726
|
+
# source://loofah//lib/loofah/scrubbers.rb#274
|
727
727
|
def scrub(node); end
|
728
728
|
end
|
729
729
|
|
@@ -744,21 +744,21 @@ end
|
|
744
744
|
# all kinds of cruft into its HTML output. Who needs that crap?
|
745
745
|
# Certainly not me.
|
746
746
|
#
|
747
|
-
# source://loofah
|
747
|
+
# source://loofah//lib/loofah/scrubbers.rb#174
|
748
748
|
class Loofah::Scrubbers::Whitewash < ::Loofah::Scrubber
|
749
749
|
# @return [Whitewash] a new instance of Whitewash
|
750
750
|
#
|
751
|
-
# source://loofah
|
751
|
+
# source://loofah//lib/loofah/scrubbers.rb#175
|
752
752
|
def initialize; end
|
753
753
|
|
754
|
-
# source://loofah
|
754
|
+
# source://loofah//lib/loofah/scrubbers.rb#179
|
755
755
|
def scrub(node); end
|
756
756
|
end
|
757
757
|
|
758
758
|
# Overrides +text+ in HTML::Document and HTML::DocumentFragment,
|
759
759
|
# and mixes in +to_text+.
|
760
760
|
#
|
761
|
-
# source://loofah
|
761
|
+
# source://loofah//lib/loofah/instance_methods.rb#73
|
762
762
|
module Loofah::TextBehavior
|
763
763
|
# Returns a plain-text version of the markup contained by the document,
|
764
764
|
# with HTML entities encoded.
|
@@ -780,7 +780,7 @@ module Loofah::TextBehavior
|
|
780
780
|
# # decidedly not ok for browser:
|
781
781
|
# frag.text(:encode_special_chars => false) # => "<script>alert('EVIL');</script>"
|
782
782
|
#
|
783
|
-
# source://loofah
|
783
|
+
# source://loofah//lib/loofah/instance_methods.rb#95
|
784
784
|
def inner_text(options = T.unsafe(nil)); end
|
785
785
|
|
786
786
|
# Returns a plain-text version of the markup contained by the document,
|
@@ -803,7 +803,7 @@ module Loofah::TextBehavior
|
|
803
803
|
# # decidedly not ok for browser:
|
804
804
|
# frag.text(:encode_special_chars => false) # => "<script>alert('EVIL');</script>"
|
805
805
|
#
|
806
|
-
# source://loofah
|
806
|
+
# source://loofah//lib/loofah/instance_methods.rb#95
|
807
807
|
def text(options = T.unsafe(nil)); end
|
808
808
|
|
809
809
|
# Returns a plain-text version of the markup contained by the document,
|
@@ -826,7 +826,7 @@ module Loofah::TextBehavior
|
|
826
826
|
# # decidedly not ok for browser:
|
827
827
|
# frag.text(:encode_special_chars => false) # => "<script>alert('EVIL');</script>"
|
828
828
|
#
|
829
|
-
# source://loofah
|
829
|
+
# source://loofah//lib/loofah/instance_methods.rb#95
|
830
830
|
def to_str(options = T.unsafe(nil)); end
|
831
831
|
|
832
832
|
# Returns a plain-text version of the markup contained by the
|
@@ -838,23 +838,23 @@ module Loofah::TextBehavior
|
|
838
838
|
# Loofah.document("<h1>Title</h1><div>Content<br>Next line</div>").to_text
|
839
839
|
# # => "\nTitle\n\nContent\nNext line\n"
|
840
840
|
#
|
841
|
-
# source://loofah
|
841
|
+
# source://loofah//lib/loofah/instance_methods.rb#121
|
842
842
|
def to_text(options = T.unsafe(nil)); end
|
843
843
|
end
|
844
844
|
|
845
845
|
# The version of Loofah you are using
|
846
846
|
#
|
847
|
-
# source://loofah
|
847
|
+
# source://loofah//lib/loofah/version.rb#4
|
848
848
|
Loofah::VERSION = T.let(T.unsafe(nil), String)
|
849
849
|
|
850
|
-
# source://loofah
|
850
|
+
# source://loofah//lib/loofah/xml/document.rb#3
|
851
851
|
module Loofah::XML; end
|
852
852
|
|
853
853
|
# Subclass of Nokogiri::XML::Document.
|
854
854
|
#
|
855
855
|
# See Loofah::ScrubBehavior and Loofah::DocumentDecorator for additional methods.
|
856
856
|
#
|
857
|
-
# source://loofah
|
857
|
+
# source://loofah//lib/loofah/xml/document.rb#9
|
858
858
|
class Loofah::XML::Document < ::Nokogiri::XML::Document
|
859
859
|
include ::Loofah::ScrubBehavior::Node
|
860
860
|
include ::Loofah::DocumentDecorator
|
@@ -864,14 +864,14 @@ end
|
|
864
864
|
#
|
865
865
|
# See Loofah::ScrubBehavior for additional methods.
|
866
866
|
#
|
867
|
-
# source://loofah
|
867
|
+
# source://loofah//lib/loofah/xml/document_fragment.rb#9
|
868
868
|
class Loofah::XML::DocumentFragment < ::Nokogiri::XML::DocumentFragment
|
869
869
|
class << self
|
870
870
|
# Overridden Nokogiri::XML::DocumentFragment
|
871
871
|
# constructor. Applications should use Loofah.fragment to
|
872
872
|
# parse a fragment.
|
873
873
|
#
|
874
|
-
# source://loofah
|
874
|
+
# source://loofah//lib/loofah/xml/document_fragment.rb#16
|
875
875
|
def parse(tags); end
|
876
876
|
end
|
877
877
|
end
|