packwerk 3.2.2 → 3.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/packwerk/application_validator.rb +2 -1
- data/lib/packwerk/graph.rb +15 -56
- data/lib/packwerk/reference_checking/checkers/dependency_checker.rb +1 -2
- data/lib/packwerk/run_context.rb +5 -0
- data/lib/packwerk/validators/dependency_validator.rb +5 -4
- data/lib/packwerk/version.rb +1 -1
- data/sorbet/rbi/gems/{actionpack@7.0.3.1.rbi → actionpack@7.0.8.7.rbi} +1338 -1227
- data/sorbet/rbi/gems/{actionview@7.0.3.1.rbi → actionview@7.0.8.7.rbi} +548 -503
- data/sorbet/rbi/gems/{activesupport@7.0.3.1.rbi → activesupport@7.0.8.7.rbi} +714 -635
- data/sorbet/rbi/gems/{better_html@2.0.1.rbi → better_html@2.1.1.rbi} +21 -21
- data/sorbet/rbi/gems/{concurrent-ruby@1.1.10.rbi → concurrent-ruby@1.3.5.rbi} +1390 -1366
- data/sorbet/rbi/gems/{constant_resolver@0.2.0.rbi → constant_resolver@0.3.0.rbi} +22 -13
- data/sorbet/rbi/gems/{erubi@1.11.0.rbi → erubi@1.13.1.rbi} +28 -17
- data/sorbet/rbi/gems/{i18n@1.12.0.rbi → i18n@1.14.7.rbi} +234 -172
- data/sorbet/rbi/gems/{json@2.6.2.rbi → json@2.7.2.rbi} +94 -74
- data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14237 -0
- data/sorbet/rbi/gems/{loofah@2.18.0.rbi → loofah@2.24.0.rbi} +470 -243
- data/sorbet/rbi/gems/{minitest@5.16.2.rbi → minitest@5.25.4.rbi} +577 -472
- data/sorbet/rbi/gems/{mocha@1.14.0.rbi → mocha@2.5.0.rbi} +468 -684
- data/sorbet/rbi/gems/{nokogiri@1.15.3.rbi → nokogiri@1.18.4.rbi} +1756 -869
- data/sorbet/rbi/gems/{parallel@1.24.0.rbi → parallel@1.25.1.rbi} +26 -20
- data/sorbet/rbi/gems/{racc@1.7.1.rbi → racc@1.8.1.rbi} +36 -36
- data/sorbet/rbi/gems/{rack-test@2.0.2.rbi → rack-test@2.2.0.rbi} +87 -114
- data/sorbet/rbi/gems/{rack@2.2.4.rbi → rack@2.2.13.rbi} +243 -195
- data/sorbet/rbi/gems/rails-dom-testing@2.2.0.rbi +754 -0
- data/sorbet/rbi/gems/rails-html-sanitizer@1.6.2.rbi +764 -0
- data/sorbet/rbi/gems/{railties@7.0.3.1.rbi → railties@7.0.8.7.rbi} +146 -140
- data/sorbet/rbi/gems/{regexp_parser@2.5.0.rbi → regexp_parser@2.9.2.rbi} +947 -542
- data/sorbet/rbi/gems/{rexml@3.2.5.rbi → rexml@3.3.9.rbi} +452 -312
- data/sorbet/rbi/gems/{rubocop-ast@1.21.0.rbi → rubocop-ast@1.31.3.rbi} +717 -588
- data/sorbet/rbi/gems/{rubocop@1.34.1.rbi → rubocop@1.64.1.rbi} +10916 -4406
- data/sorbet/rbi/gems/{ruby-progressbar@1.11.0.rbi → ruby-progressbar@1.13.0.rbi} +359 -281
- data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +8 -0
- data/sorbet/rbi/gems/{tzinfo@2.0.5.rbi → tzinfo@2.0.6.rbi} +144 -141
- data/sorbet/rbi/gems/{unicode-display_width@2.2.0.rbi → unicode-display_width@2.5.0.rbi} +24 -7
- metadata +36 -41
- data/sorbet/rbi/gems/language_server-protocol@3.16.0.3.rbi +0 -8
- data/sorbet/rbi/gems/prettier_print@0.1.0.rbi +0 -8
- data/sorbet/rbi/gems/rails-dom-testing@2.0.3.rbi +0 -455
- data/sorbet/rbi/gems/rails-html-sanitizer@1.4.3.rbi +0 -542
- data/sorbet/rbi/gems/ruby-lsp@0.2.3.rbi +0 -11
- data/sorbet/rbi/gems/syntax_tree@3.3.0.rbi +0 -8
- /data/sorbet/rbi/gems/{builder@3.2.4.rbi → builder@3.3.0.rbi} +0 -0
- /data/sorbet/rbi/gems/{parser@3.3.1.0.rbi → parser@3.3.3.0.rbi} +0 -0
@@ -1,542 +0,0 @@
|
|
1
|
-
# typed: true
|
2
|
-
|
3
|
-
# DO NOT EDIT MANUALLY
|
4
|
-
# This is an autogenerated file for types exported from the `rails-html-sanitizer` gem.
|
5
|
-
# Please instead update this file by running `bin/tapioca gem rails-html-sanitizer`.
|
6
|
-
|
7
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#30
|
8
|
-
module ActionView
|
9
|
-
class << self
|
10
|
-
# source://actionview/7.0.3.1/lib/action_view.rb#90
|
11
|
-
def eager_load!; end
|
12
|
-
|
13
|
-
# source://actionview/7.0.3.1/lib/action_view/gem_version.rb#5
|
14
|
-
def gem_version; end
|
15
|
-
|
16
|
-
# source://actionview/7.0.3.1/lib/action_view/version.rb#7
|
17
|
-
def version; end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#31
|
22
|
-
module ActionView::Helpers
|
23
|
-
include ::ActionView::Helpers::SanitizeHelper
|
24
|
-
include ::ActionView::Helpers::TextHelper
|
25
|
-
include ::ActionView::Helpers::UrlHelper
|
26
|
-
include ::ActionView::Helpers::SanitizeHelper
|
27
|
-
include ::ActionView::Helpers::TextHelper
|
28
|
-
include ::ActionView::Helpers::FormTagHelper
|
29
|
-
include ::ActionView::Helpers::FormHelper
|
30
|
-
include ::ActionView::Helpers::TranslationHelper
|
31
|
-
|
32
|
-
mixes_in_class_methods ::ActionView::Helpers::UrlHelper::ClassMethods
|
33
|
-
mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods
|
34
|
-
|
35
|
-
class << self
|
36
|
-
# source://actionview/7.0.3.1/lib/action_view/helpers.rb#34
|
37
|
-
def eager_load!; end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#32
|
42
|
-
module ActionView::Helpers::SanitizeHelper
|
43
|
-
mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods
|
44
|
-
|
45
|
-
# source://actionview/7.0.3.1/lib/action_view/helpers/sanitize_helper.rb#81
|
46
|
-
def sanitize(html, options = T.unsafe(nil)); end
|
47
|
-
|
48
|
-
# source://actionview/7.0.3.1/lib/action_view/helpers/sanitize_helper.rb#86
|
49
|
-
def sanitize_css(style); end
|
50
|
-
|
51
|
-
# source://actionview/7.0.3.1/lib/action_view/helpers/sanitize_helper.rb#120
|
52
|
-
def strip_links(html); end
|
53
|
-
|
54
|
-
# source://actionview/7.0.3.1/lib/action_view/helpers/sanitize_helper.rb#103
|
55
|
-
def strip_tags(html); end
|
56
|
-
end
|
57
|
-
|
58
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#33
|
59
|
-
module ActionView::Helpers::SanitizeHelper::ClassMethods
|
60
|
-
# source://actionview/7.0.3.1/lib/action_view/helpers/sanitize_helper.rb#145
|
61
|
-
def full_sanitizer; end
|
62
|
-
|
63
|
-
# source://actionview/7.0.3.1/lib/action_view/helpers/sanitize_helper.rb#125
|
64
|
-
def full_sanitizer=(_arg0); end
|
65
|
-
|
66
|
-
# source://actionview/7.0.3.1/lib/action_view/helpers/sanitize_helper.rb#155
|
67
|
-
def link_sanitizer; end
|
68
|
-
|
69
|
-
# source://actionview/7.0.3.1/lib/action_view/helpers/sanitize_helper.rb#125
|
70
|
-
def link_sanitizer=(_arg0); end
|
71
|
-
|
72
|
-
# source://actionview/7.0.3.1/lib/action_view/helpers/sanitize_helper.rb#165
|
73
|
-
def safe_list_sanitizer; end
|
74
|
-
|
75
|
-
# source://actionview/7.0.3.1/lib/action_view/helpers/sanitize_helper.rb#125
|
76
|
-
def safe_list_sanitizer=(_arg0); end
|
77
|
-
|
78
|
-
# source://actionview/7.0.3.1/lib/action_view/helpers/sanitize_helper.rb#135
|
79
|
-
def sanitized_allowed_attributes; end
|
80
|
-
|
81
|
-
# Replaces the allowed HTML attributes for the +sanitize+ helper.
|
82
|
-
#
|
83
|
-
# class Application < Rails::Application
|
84
|
-
# config.action_view.sanitized_allowed_attributes = ['onclick', 'longdesc']
|
85
|
-
# end
|
86
|
-
#
|
87
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#50
|
88
|
-
def sanitized_allowed_attributes=(attributes); end
|
89
|
-
|
90
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#63
|
91
|
-
def sanitized_allowed_css_keywords; end
|
92
|
-
|
93
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#64
|
94
|
-
def sanitized_allowed_css_keywords=(_); end
|
95
|
-
|
96
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#63
|
97
|
-
def sanitized_allowed_css_properties; end
|
98
|
-
|
99
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#64
|
100
|
-
def sanitized_allowed_css_properties=(_); end
|
101
|
-
|
102
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#63
|
103
|
-
def sanitized_allowed_protocols; end
|
104
|
-
|
105
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#64
|
106
|
-
def sanitized_allowed_protocols=(_); end
|
107
|
-
|
108
|
-
# source://actionview/7.0.3.1/lib/action_view/helpers/sanitize_helper.rb#131
|
109
|
-
def sanitized_allowed_tags; end
|
110
|
-
|
111
|
-
# Replaces the allowed tags for the +sanitize+ helper.
|
112
|
-
#
|
113
|
-
# class Application < Rails::Application
|
114
|
-
# config.action_view.sanitized_allowed_tags = 'table', 'tr', 'td'
|
115
|
-
# end
|
116
|
-
#
|
117
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#40
|
118
|
-
def sanitized_allowed_tags=(tags); end
|
119
|
-
|
120
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#63
|
121
|
-
def sanitized_bad_tags; end
|
122
|
-
|
123
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#64
|
124
|
-
def sanitized_bad_tags=(_); end
|
125
|
-
|
126
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#63
|
127
|
-
def sanitized_protocol_separator; end
|
128
|
-
|
129
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#64
|
130
|
-
def sanitized_protocol_separator=(_); end
|
131
|
-
|
132
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#63
|
133
|
-
def sanitized_shorthand_css_properties; end
|
134
|
-
|
135
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#64
|
136
|
-
def sanitized_shorthand_css_properties=(_); end
|
137
|
-
|
138
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#63
|
139
|
-
def sanitized_uri_attributes; end
|
140
|
-
|
141
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#64
|
142
|
-
def sanitized_uri_attributes=(_); end
|
143
|
-
|
144
|
-
# source://actionview/7.0.3.1/lib/action_view/helpers/sanitize_helper.rb#127
|
145
|
-
def sanitizer_vendor; end
|
146
|
-
|
147
|
-
private
|
148
|
-
|
149
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#68
|
150
|
-
def deprecate_option(name); end
|
151
|
-
end
|
152
|
-
|
153
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer/version.rb#1
|
154
|
-
module Rails
|
155
|
-
class << self
|
156
|
-
# source://railties/7.0.3.1/lib/rails.rb#38
|
157
|
-
def app_class; end
|
158
|
-
|
159
|
-
# source://railties/7.0.3.1/lib/rails.rb#38
|
160
|
-
def app_class=(_arg0); end
|
161
|
-
|
162
|
-
# source://railties/7.0.3.1/lib/rails.rb#39
|
163
|
-
def application; end
|
164
|
-
|
165
|
-
# source://railties/7.0.3.1/lib/rails.rb#37
|
166
|
-
def application=(_arg0); end
|
167
|
-
|
168
|
-
# source://railties/7.0.3.1/lib/rails.rb#116
|
169
|
-
def autoloaders; end
|
170
|
-
|
171
|
-
# source://railties/7.0.3.1/lib/rails.rb#50
|
172
|
-
def backtrace_cleaner; end
|
173
|
-
|
174
|
-
# source://railties/7.0.3.1/lib/rails.rb#38
|
175
|
-
def cache; end
|
176
|
-
|
177
|
-
# source://railties/7.0.3.1/lib/rails.rb#38
|
178
|
-
def cache=(_arg0); end
|
179
|
-
|
180
|
-
# source://railties/7.0.3.1/lib/rails.rb#46
|
181
|
-
def configuration; end
|
182
|
-
|
183
|
-
# source://railties/7.0.3.1/lib/rails.rb#72
|
184
|
-
def env; end
|
185
|
-
|
186
|
-
# source://railties/7.0.3.1/lib/rails.rb#79
|
187
|
-
def env=(environment); end
|
188
|
-
|
189
|
-
# source://railties/7.0.3.1/lib/rails.rb#83
|
190
|
-
def error; end
|
191
|
-
|
192
|
-
# source://railties/7.0.3.1/lib/rails/gem_version.rb#5
|
193
|
-
def gem_version; end
|
194
|
-
|
195
|
-
# source://railties/7.0.3.1/lib/rails.rb#96
|
196
|
-
def groups(*groups); end
|
197
|
-
|
198
|
-
# source://railties/7.0.3.1/lib/rails.rb#43
|
199
|
-
def initialize!(*_arg0, **_arg1, &_arg2); end
|
200
|
-
|
201
|
-
# source://railties/7.0.3.1/lib/rails.rb#43
|
202
|
-
def initialized?(*_arg0, **_arg1, &_arg2); end
|
203
|
-
|
204
|
-
# source://railties/7.0.3.1/lib/rails.rb#38
|
205
|
-
def logger; end
|
206
|
-
|
207
|
-
# source://railties/7.0.3.1/lib/rails.rb#38
|
208
|
-
def logger=(_arg0); end
|
209
|
-
|
210
|
-
# source://railties/7.0.3.1/lib/rails.rb#112
|
211
|
-
def public_path; end
|
212
|
-
|
213
|
-
# source://railties/7.0.3.1/lib/rails.rb#63
|
214
|
-
def root; end
|
215
|
-
|
216
|
-
# source://railties/7.0.3.1/lib/rails/version.rb#7
|
217
|
-
def version; end
|
218
|
-
end
|
219
|
-
end
|
220
|
-
|
221
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer/version.rb#2
|
222
|
-
module Rails::Html; end
|
223
|
-
|
224
|
-
# === Rails::Html::FullSanitizer
|
225
|
-
# Removes all tags but strips out scripts, forms and comments.
|
226
|
-
#
|
227
|
-
# full_sanitizer = Rails::Html::FullSanitizer.new
|
228
|
-
# full_sanitizer.sanitize("<b>Bold</b> no more! <a href='more.html'>See more here</a>...")
|
229
|
-
# # => Bold no more! See more here...
|
230
|
-
#
|
231
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#28
|
232
|
-
class Rails::Html::FullSanitizer < ::Rails::Html::Sanitizer
|
233
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#29
|
234
|
-
def sanitize(html, options = T.unsafe(nil)); end
|
235
|
-
end
|
236
|
-
|
237
|
-
# === Rails::Html::LinkSanitizer
|
238
|
-
# Removes +a+ tags and +href+ attributes leaving only the link text.
|
239
|
-
#
|
240
|
-
# link_sanitizer = Rails::Html::LinkSanitizer.new
|
241
|
-
# link_sanitizer.sanitize('<a href="example.com">Only the link text will be kept.</a>')
|
242
|
-
#
|
243
|
-
# => 'Only the link text will be kept.'
|
244
|
-
#
|
245
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#49
|
246
|
-
class Rails::Html::LinkSanitizer < ::Rails::Html::Sanitizer
|
247
|
-
# @return [LinkSanitizer] a new instance of LinkSanitizer
|
248
|
-
#
|
249
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#50
|
250
|
-
def initialize; end
|
251
|
-
|
252
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#56
|
253
|
-
def sanitize(html, options = T.unsafe(nil)); end
|
254
|
-
end
|
255
|
-
|
256
|
-
# === Rails::Html::PermitScrubber
|
257
|
-
#
|
258
|
-
# +Rails::Html::PermitScrubber+ allows you to permit only your own tags and/or attributes.
|
259
|
-
#
|
260
|
-
# +Rails::Html::PermitScrubber+ can be subclassed to determine:
|
261
|
-
# - When a node should be skipped via +skip_node?+.
|
262
|
-
# - When a node is allowed via +allowed_node?+.
|
263
|
-
# - When an attribute should be scrubbed via +scrub_attribute?+.
|
264
|
-
#
|
265
|
-
# Subclasses don't need to worry if tags or attributes are set or not.
|
266
|
-
# If tags or attributes are not set, Loofah's behavior will be used.
|
267
|
-
# If you override +allowed_node?+ and no tags are set, it will not be called.
|
268
|
-
# Instead Loofahs behavior will be used.
|
269
|
-
# Likewise for +scrub_attribute?+ and attributes respectively.
|
270
|
-
#
|
271
|
-
# Text and CDATA nodes are skipped by default.
|
272
|
-
# Unallowed elements will be stripped, i.e. element is removed but its subtree kept.
|
273
|
-
# Supplied tags and attributes should be Enumerables.
|
274
|
-
#
|
275
|
-
# +tags=+
|
276
|
-
# If set, elements excluded will be stripped.
|
277
|
-
# If not, elements are stripped based on Loofahs +HTML5::Scrub.allowed_element?+.
|
278
|
-
#
|
279
|
-
# +attributes=+
|
280
|
-
# If set, attributes excluded will be removed.
|
281
|
-
# If not, attributes are removed based on Loofahs +HTML5::Scrub.scrub_attributes+.
|
282
|
-
#
|
283
|
-
# class CommentScrubber < Html::PermitScrubber
|
284
|
-
# def initialize
|
285
|
-
# super
|
286
|
-
# self.tags = %w(form script comment blockquote)
|
287
|
-
# end
|
288
|
-
#
|
289
|
-
# def skip_node?(node)
|
290
|
-
# node.text?
|
291
|
-
# end
|
292
|
-
#
|
293
|
-
# def scrub_attribute?(name)
|
294
|
-
# name == "style"
|
295
|
-
# end
|
296
|
-
# end
|
297
|
-
#
|
298
|
-
# See the documentation for +Nokogiri::XML::Node+ to understand what's possible
|
299
|
-
# with nodes: https://nokogiri.org/rdoc/Nokogiri/XML/Node.html
|
300
|
-
#
|
301
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#47
|
302
|
-
class Rails::Html::PermitScrubber < ::Loofah::Scrubber
|
303
|
-
# @return [PermitScrubber] a new instance of PermitScrubber
|
304
|
-
#
|
305
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#50
|
306
|
-
def initialize; end
|
307
|
-
|
308
|
-
# Returns the value of attribute attributes.
|
309
|
-
#
|
310
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#48
|
311
|
-
def attributes; end
|
312
|
-
|
313
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#59
|
314
|
-
def attributes=(attributes); end
|
315
|
-
|
316
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#63
|
317
|
-
def scrub(node); end
|
318
|
-
|
319
|
-
# Returns the value of attribute tags.
|
320
|
-
#
|
321
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#48
|
322
|
-
def tags; end
|
323
|
-
|
324
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#55
|
325
|
-
def tags=(tags); end
|
326
|
-
|
327
|
-
protected
|
328
|
-
|
329
|
-
# @return [Boolean]
|
330
|
-
#
|
331
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#80
|
332
|
-
def allowed_node?(node); end
|
333
|
-
|
334
|
-
# @return [Boolean]
|
335
|
-
#
|
336
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#92
|
337
|
-
def keep_node?(node); end
|
338
|
-
|
339
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#134
|
340
|
-
def scrub_attribute(node, attr_node); end
|
341
|
-
|
342
|
-
# @return [Boolean]
|
343
|
-
#
|
344
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#88
|
345
|
-
def scrub_attribute?(name); end
|
346
|
-
|
347
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#105
|
348
|
-
def scrub_attributes(node); end
|
349
|
-
|
350
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#118
|
351
|
-
def scrub_css_attribute(node); end
|
352
|
-
|
353
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#100
|
354
|
-
def scrub_node(node); end
|
355
|
-
|
356
|
-
# @return [Boolean]
|
357
|
-
#
|
358
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#84
|
359
|
-
def skip_node?(node); end
|
360
|
-
|
361
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#127
|
362
|
-
def validate!(var, name); end
|
363
|
-
end
|
364
|
-
|
365
|
-
# === Rails::Html::SafeListSanitizer
|
366
|
-
# Sanitizes html and css from an extensive safe list (see link further down).
|
367
|
-
#
|
368
|
-
# === Whitespace
|
369
|
-
# We can't make any guarantees about whitespace being kept or stripped.
|
370
|
-
# Loofah uses Nokogiri, which wraps either a C or Java parser for the
|
371
|
-
# respective Ruby implementation.
|
372
|
-
# Those two parsers determine how whitespace is ultimately handled.
|
373
|
-
#
|
374
|
-
# When the stripped markup will be rendered the users browser won't take
|
375
|
-
# whitespace into account anyway. It might be better to suggest your users
|
376
|
-
# wrap their whitespace sensitive content in pre tags or that you do
|
377
|
-
# so automatically.
|
378
|
-
#
|
379
|
-
# === Options
|
380
|
-
# Sanitizes both html and css via the safe lists found here:
|
381
|
-
# https://github.com/flavorjones/loofah/blob/master/lib/loofah/html5/safelist.rb
|
382
|
-
#
|
383
|
-
# SafeListSanitizer also accepts options to configure
|
384
|
-
# the safe list used when sanitizing html.
|
385
|
-
# There's a class level option:
|
386
|
-
# Rails::Html::SafeListSanitizer.allowed_tags = %w(table tr td)
|
387
|
-
# Rails::Html::SafeListSanitizer.allowed_attributes = %w(id class style)
|
388
|
-
#
|
389
|
-
# Tags and attributes can also be passed to +sanitize+.
|
390
|
-
# Passed options take precedence over the class level options.
|
391
|
-
#
|
392
|
-
# === Examples
|
393
|
-
# safe_list_sanitizer = Rails::Html::SafeListSanitizer.new
|
394
|
-
#
|
395
|
-
# Sanitize css doesn't take options
|
396
|
-
# safe_list_sanitizer.sanitize_css('background-color: #000;')
|
397
|
-
#
|
398
|
-
# Default: sanitize via a extensive safe list of allowed elements
|
399
|
-
# safe_list_sanitizer.sanitize(@article.body)
|
400
|
-
#
|
401
|
-
# Safe list via the supplied tags and attributes
|
402
|
-
# safe_list_sanitizer.sanitize(@article.body, tags: %w(table tr td),
|
403
|
-
# attributes: %w(id class style))
|
404
|
-
#
|
405
|
-
# Safe list via a custom scrubber
|
406
|
-
# safe_list_sanitizer.sanitize(@article.body, scrubber: ArticleScrubber.new)
|
407
|
-
#
|
408
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#103
|
409
|
-
class Rails::Html::SafeListSanitizer < ::Rails::Html::Sanitizer
|
410
|
-
# @return [SafeListSanitizer] a new instance of SafeListSanitizer
|
411
|
-
#
|
412
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#113
|
413
|
-
def initialize; end
|
414
|
-
|
415
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#117
|
416
|
-
def sanitize(html, options = T.unsafe(nil)); end
|
417
|
-
|
418
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#138
|
419
|
-
def sanitize_css(style_string); end
|
420
|
-
|
421
|
-
private
|
422
|
-
|
423
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#165
|
424
|
-
def allowed_attributes(options); end
|
425
|
-
|
426
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#157
|
427
|
-
def allowed_tags(options); end
|
428
|
-
|
429
|
-
# @return [Boolean]
|
430
|
-
#
|
431
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#144
|
432
|
-
def loofah_using_html5?; end
|
433
|
-
|
434
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#149
|
435
|
-
def remove_safelist_tag_combinations(tags); end
|
436
|
-
|
437
|
-
class << self
|
438
|
-
# Returns the value of attribute allowed_attributes.
|
439
|
-
#
|
440
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#106
|
441
|
-
def allowed_attributes; end
|
442
|
-
|
443
|
-
# Sets the attribute allowed_attributes
|
444
|
-
#
|
445
|
-
# @param value the value to set the attribute allowed_attributes to.
|
446
|
-
#
|
447
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#106
|
448
|
-
def allowed_attributes=(_arg0); end
|
449
|
-
|
450
|
-
# Returns the value of attribute allowed_tags.
|
451
|
-
#
|
452
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#105
|
453
|
-
def allowed_tags; end
|
454
|
-
|
455
|
-
# Sets the attribute allowed_tags
|
456
|
-
#
|
457
|
-
# @param value the value to set the attribute allowed_tags to.
|
458
|
-
#
|
459
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#105
|
460
|
-
def allowed_tags=(_arg0); end
|
461
|
-
end
|
462
|
-
end
|
463
|
-
|
464
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer/version.rb#3
|
465
|
-
class Rails::Html::Sanitizer
|
466
|
-
# @raise [NotImplementedError]
|
467
|
-
#
|
468
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#6
|
469
|
-
def sanitize(html, options = T.unsafe(nil)); end
|
470
|
-
|
471
|
-
private
|
472
|
-
|
473
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#17
|
474
|
-
def properly_encode(fragment, options); end
|
475
|
-
|
476
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#12
|
477
|
-
def remove_xpaths(node, xpaths); end
|
478
|
-
|
479
|
-
class << self
|
480
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#10
|
481
|
-
def full_sanitizer; end
|
482
|
-
|
483
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#14
|
484
|
-
def link_sanitizer; end
|
485
|
-
|
486
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#18
|
487
|
-
def safe_list_sanitizer; end
|
488
|
-
|
489
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#22
|
490
|
-
def white_list_sanitizer; end
|
491
|
-
end
|
492
|
-
end
|
493
|
-
|
494
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer/version.rb#4
|
495
|
-
Rails::Html::Sanitizer::VERSION = T.let(T.unsafe(nil), String)
|
496
|
-
|
497
|
-
# === Rails::Html::TargetScrubber
|
498
|
-
#
|
499
|
-
# Where +Rails::Html::PermitScrubber+ picks out tags and attributes to permit in
|
500
|
-
# sanitization, +Rails::Html::TargetScrubber+ targets them for removal.
|
501
|
-
#
|
502
|
-
# +tags=+
|
503
|
-
# If set, elements included will be stripped.
|
504
|
-
#
|
505
|
-
# +attributes=+
|
506
|
-
# If set, attributes included will be removed.
|
507
|
-
#
|
508
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#171
|
509
|
-
class Rails::Html::TargetScrubber < ::Rails::Html::PermitScrubber
|
510
|
-
# @return [Boolean]
|
511
|
-
#
|
512
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#172
|
513
|
-
def allowed_node?(node); end
|
514
|
-
|
515
|
-
# @return [Boolean]
|
516
|
-
#
|
517
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#176
|
518
|
-
def scrub_attribute?(name); end
|
519
|
-
end
|
520
|
-
|
521
|
-
# === Rails::Html::TextOnlyScrubber
|
522
|
-
#
|
523
|
-
# +Rails::Html::TextOnlyScrubber+ allows you to permit text nodes.
|
524
|
-
#
|
525
|
-
# Unallowed elements will be stripped, i.e. element is removed but its subtree kept.
|
526
|
-
#
|
527
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#186
|
528
|
-
class Rails::Html::TextOnlyScrubber < ::Loofah::Scrubber
|
529
|
-
# @return [TextOnlyScrubber] a new instance of TextOnlyScrubber
|
530
|
-
#
|
531
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#187
|
532
|
-
def initialize; end
|
533
|
-
|
534
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#191
|
535
|
-
def scrub(node); end
|
536
|
-
end
|
537
|
-
|
538
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#170
|
539
|
-
Rails::Html::WhiteListSanitizer = Rails::Html::SafeListSanitizer
|
540
|
-
|
541
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#3
|
542
|
-
Rails::Html::XPATHS_TO_REMOVE = T.let(T.unsafe(nil), Array)
|
@@ -1,11 +0,0 @@
|
|
1
|
-
# typed: true
|
2
|
-
|
3
|
-
# DO NOT EDIT MANUALLY
|
4
|
-
# This is an autogenerated file for types exported from the `ruby-lsp` gem.
|
5
|
-
# Please instead update this file by running `bin/tapioca gem ruby-lsp`.
|
6
|
-
|
7
|
-
# source://ruby-lsp//lib/ruby-lsp.rb#4
|
8
|
-
module RubyLsp; end
|
9
|
-
|
10
|
-
# source://ruby-lsp//lib/ruby-lsp.rb#5
|
11
|
-
RubyLsp::VERSION = T.let(T.unsafe(nil), String)
|
@@ -1,8 +0,0 @@
|
|
1
|
-
# typed: true
|
2
|
-
|
3
|
-
# DO NOT EDIT MANUALLY
|
4
|
-
# This is an autogenerated file for types exported from the `syntax_tree` gem.
|
5
|
-
# Please instead update this file by running `bin/tapioca gem syntax_tree`.
|
6
|
-
|
7
|
-
# THIS IS AN EMPTY RBI FILE.
|
8
|
-
# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem
|
File without changes
|
File without changes
|