active_cached_resource 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/LICENSE +21 -0
- data/lib/active_cached_resource/caching.rb +104 -1
- data/lib/active_cached_resource/configuration.rb +22 -1
- data/lib/active_cached_resource/logger.rb +14 -0
- data/lib/active_cached_resource/model.rb +18 -0
- data/lib/active_cached_resource/version.rb +1 -8
- metadata +2 -308
- data/.rspec +0 -3
- data/.rubocop.yml +0 -23
- data/.standard.yml +0 -2
- data/Rakefile +0 -29
- data/example/consumer/.dockerignore +0 -41
- data/example/consumer/.gitattributes +0 -9
- data/example/consumer/.gitignore +0 -36
- data/example/consumer/.kamal/hooks/docker-setup.sample +0 -3
- data/example/consumer/.kamal/hooks/post-deploy.sample +0 -14
- data/example/consumer/.kamal/hooks/post-proxy-reboot.sample +0 -3
- data/example/consumer/.kamal/hooks/pre-build.sample +0 -51
- data/example/consumer/.kamal/hooks/pre-connect.sample +0 -47
- data/example/consumer/.kamal/hooks/pre-deploy.sample +0 -109
- data/example/consumer/.kamal/hooks/pre-proxy-reboot.sample +0 -3
- data/example/consumer/.kamal/secrets +0 -17
- data/example/consumer/Dockerfile +0 -65
- data/example/consumer/Gemfile +0 -17
- data/example/consumer/Rakefile +0 -6
- data/example/consumer/app/controllers/application_controller.rb +0 -2
- data/example/consumer/app/controllers/concerns/.keep +0 -0
- data/example/consumer/app/jobs/application_job.rb +0 -7
- data/example/consumer/app/mailers/application_mailer.rb +0 -4
- data/example/consumer/app/models/application_record.rb +0 -3
- data/example/consumer/app/models/concerns/.keep +0 -0
- data/example/consumer/app/models/person.rb +0 -9
- data/example/consumer/app/views/layouts/mailer.html.erb +0 -13
- data/example/consumer/app/views/layouts/mailer.text.erb +0 -1
- data/example/consumer/bin/brakeman +0 -7
- data/example/consumer/bin/bundle +0 -109
- data/example/consumer/bin/dev +0 -2
- data/example/consumer/bin/docker-entrypoint +0 -14
- data/example/consumer/bin/jobs +0 -6
- data/example/consumer/bin/kamal +0 -27
- data/example/consumer/bin/rails +0 -4
- data/example/consumer/bin/rake +0 -4
- data/example/consumer/bin/rubocop +0 -8
- data/example/consumer/bin/setup +0 -34
- data/example/consumer/bin/thrust +0 -5
- data/example/consumer/config/application.rb +0 -20
- data/example/consumer/config/boot.rb +0 -3
- data/example/consumer/config/cache.yml +0 -16
- data/example/consumer/config/credentials.yml.enc +0 -1
- data/example/consumer/config/database.yml +0 -14
- data/example/consumer/config/deploy.yml +0 -116
- data/example/consumer/config/environment.rb +0 -5
- data/example/consumer/config/environments/development.rb +0 -64
- data/example/consumer/config/environments/production.rb +0 -85
- data/example/consumer/config/environments/test.rb +0 -50
- data/example/consumer/config/initializers/cors.rb +0 -16
- data/example/consumer/config/initializers/filter_parameter_logging.rb +0 -8
- data/example/consumer/config/initializers/inflections.rb +0 -16
- data/example/consumer/config/locales/en.yml +0 -31
- data/example/consumer/config/puma.rb +0 -41
- data/example/consumer/config/queue.yml +0 -18
- data/example/consumer/config/recurring.yml +0 -10
- data/example/consumer/config/routes.rb +0 -10
- data/example/consumer/config.ru +0 -6
- data/example/consumer/db/cache_schema.rb +0 -14
- data/example/consumer/db/queue_schema.rb +0 -129
- data/example/consumer/db/seeds.rb +0 -0
- data/example/consumer/lib/tasks/.keep +0 -0
- data/example/consumer/log/.keep +0 -0
- data/example/consumer/public/robots.txt +0 -1
- data/example/consumer/script/.keep +0 -0
- data/example/consumer/storage/.keep +0 -0
- data/example/consumer/tmp/.keep +0 -0
- data/example/consumer/tmp/cache/.keep +0 -0
- data/example/consumer/tmp/pids/.keep +0 -0
- data/example/consumer/tmp/storage/.keep +0 -0
- data/example/consumer/vendor/.keep +0 -0
- data/example/provider/.dockerignore +0 -41
- data/example/provider/.gitattributes +0 -9
- data/example/provider/.gitignore +0 -32
- data/example/provider/.kamal/hooks/docker-setup.sample +0 -3
- data/example/provider/.kamal/hooks/post-deploy.sample +0 -14
- data/example/provider/.kamal/hooks/post-proxy-reboot.sample +0 -3
- data/example/provider/.kamal/hooks/pre-build.sample +0 -51
- data/example/provider/.kamal/hooks/pre-connect.sample +0 -47
- data/example/provider/.kamal/hooks/pre-deploy.sample +0 -109
- data/example/provider/.kamal/hooks/pre-proxy-reboot.sample +0 -3
- data/example/provider/.kamal/secrets +0 -17
- data/example/provider/Dockerfile +0 -65
- data/example/provider/Gemfile +0 -14
- data/example/provider/Rakefile +0 -6
- data/example/provider/app/controllers/application_controller.rb +0 -2
- data/example/provider/app/controllers/concerns/.keep +0 -0
- data/example/provider/app/controllers/people_controller.rb +0 -68
- data/example/provider/app/jobs/application_job.rb +0 -7
- data/example/provider/app/mailers/application_mailer.rb +0 -4
- data/example/provider/app/models/address.rb +0 -3
- data/example/provider/app/models/application_record.rb +0 -3
- data/example/provider/app/models/company.rb +0 -3
- data/example/provider/app/models/concerns/.keep +0 -0
- data/example/provider/app/models/person.rb +0 -6
- data/example/provider/app/views/layouts/mailer.html.erb +0 -13
- data/example/provider/app/views/layouts/mailer.text.erb +0 -1
- data/example/provider/bin/brakeman +0 -7
- data/example/provider/bin/bundle +0 -109
- data/example/provider/bin/dev +0 -2
- data/example/provider/bin/docker-entrypoint +0 -14
- data/example/provider/bin/jobs +0 -6
- data/example/provider/bin/kamal +0 -27
- data/example/provider/bin/rails +0 -4
- data/example/provider/bin/rake +0 -4
- data/example/provider/bin/rubocop +0 -8
- data/example/provider/bin/setup +0 -34
- data/example/provider/bin/thrust +0 -5
- data/example/provider/config/application.rb +0 -44
- data/example/provider/config/boot.rb +0 -3
- data/example/provider/config/cache.yml +0 -16
- data/example/provider/config/credentials.yml.enc +0 -1
- data/example/provider/config/database.yml +0 -20
- data/example/provider/config/deploy.yml +0 -116
- data/example/provider/config/environment.rb +0 -5
- data/example/provider/config/environments/development.rb +0 -64
- data/example/provider/config/environments/production.rb +0 -85
- data/example/provider/config/environments/test.rb +0 -50
- data/example/provider/config/initializers/cors.rb +0 -16
- data/example/provider/config/initializers/filter_parameter_logging.rb +0 -8
- data/example/provider/config/initializers/inflections.rb +0 -16
- data/example/provider/config/locales/en.yml +0 -31
- data/example/provider/config/puma.rb +0 -41
- data/example/provider/config/queue.yml +0 -18
- data/example/provider/config/recurring.yml +0 -10
- data/example/provider/config/routes.rb +0 -4
- data/example/provider/config.ru +0 -6
- data/example/provider/db/cache_schema.rb +0 -14
- data/example/provider/db/migrate/20241202183937_create_people.rb +0 -11
- data/example/provider/db/migrate/20241202183955_create_addresses.rb +0 -13
- data/example/provider/db/migrate/20241202184017_create_companies.rb +0 -14
- data/example/provider/db/queue_schema.rb +0 -129
- data/example/provider/db/schema.rb +0 -47
- data/example/provider/db/seeds.rb +0 -18
- data/example/provider/lib/tasks/.keep +0 -0
- data/example/provider/log/.keep +0 -0
- data/example/provider/public/robots.txt +0 -1
- data/example/provider/script/.keep +0 -0
- data/example/provider/storage/.keep +0 -0
- data/example/provider/tmp/.keep +0 -0
- data/example/provider/tmp/pids/.keep +0 -0
- data/example/provider/tmp/storage/.keep +0 -0
- data/example/provider/vendor/.keep +0 -0
- data/lib/activeresource/.gitignore +0 -15
- data/lib/activeresource/examples/performance.rb +0 -72
- data/lib/activeresource/test/abstract_unit.rb +0 -154
- data/lib/activeresource/test/cases/active_job_serializer_test.rb +0 -53
- data/lib/activeresource/test/cases/association_test.rb +0 -104
- data/lib/activeresource/test/cases/associations/builder/belongs_to_test.rb +0 -42
- data/lib/activeresource/test/cases/associations/builder/has_many_test.rb +0 -28
- data/lib/activeresource/test/cases/associations/builder/has_one_test.rb +0 -28
- data/lib/activeresource/test/cases/authorization_test.rb +0 -276
- data/lib/activeresource/test/cases/base/custom_methods_test.rb +0 -155
- data/lib/activeresource/test/cases/base/equality_test.rb +0 -53
- data/lib/activeresource/test/cases/base/load_test.rb +0 -249
- data/lib/activeresource/test/cases/base/schema_test.rb +0 -428
- data/lib/activeresource/test/cases/base_errors_test.rb +0 -129
- data/lib/activeresource/test/cases/base_test.rb +0 -1622
- data/lib/activeresource/test/cases/callbacks_test.rb +0 -155
- data/lib/activeresource/test/cases/collection_test.rb +0 -196
- data/lib/activeresource/test/cases/connection_test.rb +0 -357
- data/lib/activeresource/test/cases/finder_test.rb +0 -217
- data/lib/activeresource/test/cases/format_test.rb +0 -137
- data/lib/activeresource/test/cases/http_mock_test.rb +0 -213
- data/lib/activeresource/test/cases/inheritence_test.rb +0 -19
- data/lib/activeresource/test/cases/inheriting_hash_test.rb +0 -25
- data/lib/activeresource/test/cases/log_subscriber_test.rb +0 -64
- data/lib/activeresource/test/cases/reflection_test.rb +0 -65
- data/lib/activeresource/test/cases/validations_test.rb +0 -78
- data/lib/activeresource/test/fixtures/address.rb +0 -20
- data/lib/activeresource/test/fixtures/beast.rb +0 -16
- data/lib/activeresource/test/fixtures/comment.rb +0 -5
- data/lib/activeresource/test/fixtures/customer.rb +0 -5
- data/lib/activeresource/test/fixtures/fixtures.rbi +0 -46
- data/lib/activeresource/test/fixtures/inventory.rb +0 -14
- data/lib/activeresource/test/fixtures/person.rb +0 -15
- data/lib/activeresource/test/fixtures/pet.rb +0 -6
- data/lib/activeresource/test/fixtures/post.rb +0 -5
- data/lib/activeresource/test/fixtures/product.rb +0 -11
- data/lib/activeresource/test/fixtures/project.rb +0 -19
- data/lib/activeresource/test/fixtures/proxy.rb +0 -6
- data/lib/activeresource/test/fixtures/sound.rb +0 -11
- data/lib/activeresource/test/fixtures/street_address.rb +0 -6
- data/lib/activeresource/test/fixtures/subscription_plan.rb +0 -7
- data/lib/activeresource/test/fixtures/weather.rb +0 -21
- data/lib/activeresource/test/setter_trap.rb +0 -28
- data/lib/activeresource/test/singleton_test.rb +0 -138
- data/lib/activeresource/test/threadsafe_attributes_test.rb +0 -91
- data/sorbet/config +0 -6
- data/sorbet/rbi/annotations/.gitattributes +0 -1
- data/sorbet/rbi/annotations/activemodel.rbi +0 -89
- data/sorbet/rbi/annotations/activesupport.rbi +0 -457
- data/sorbet/rbi/annotations/minitest.rbi +0 -119
- data/sorbet/rbi/annotations/rainbow.rbi +0 -269
- data/sorbet/rbi/dsl/.gitattributes +0 -1
- data/sorbet/rbi/dsl/active_support/callbacks.rbi +0 -21
- data/sorbet/rbi/gems/.gitattributes +0 -1
- data/sorbet/rbi/gems/actioncable@8.0.1.rbi +0 -252
- data/sorbet/rbi/gems/actionmailbox@8.0.1.rbi +0 -9
- data/sorbet/rbi/gems/actionmailer@8.0.1.rbi +0 -9
- data/sorbet/rbi/gems/actionpack@8.0.1.rbi +0 -21111
- data/sorbet/rbi/gems/actiontext@8.0.1.rbi +0 -9
- data/sorbet/rbi/gems/actionview@8.0.1.rbi +0 -16409
- data/sorbet/rbi/gems/activejob@8.0.1.rbi +0 -90
- data/sorbet/rbi/gems/activemodel-serializers-xml@1.0.3.rbi +0 -166
- data/sorbet/rbi/gems/activemodel@8.0.1.rbi +0 -6865
- data/sorbet/rbi/gems/activerecord@8.0.1.rbi +0 -43277
- data/sorbet/rbi/gems/activestorage@8.0.1.rbi +0 -9
- data/sorbet/rbi/gems/activesupport@8.0.1.rbi +0 -21426
- data/sorbet/rbi/gems/ast@2.4.2.rbi +0 -585
- data/sorbet/rbi/gems/base64@0.2.0.rbi +0 -509
- data/sorbet/rbi/gems/benchmark@0.4.0.rbi +0 -618
- data/sorbet/rbi/gems/bigdecimal@3.1.8.rbi +0 -78
- data/sorbet/rbi/gems/builder@3.3.0.rbi +0 -9
- data/sorbet/rbi/gems/bump@0.10.0.rbi +0 -169
- data/sorbet/rbi/gems/byebug@11.1.3.rbi +0 -3607
- data/sorbet/rbi/gems/coderay@1.1.3.rbi +0 -3427
- data/sorbet/rbi/gems/concurrent-ruby@1.3.4.rbi +0 -11645
- data/sorbet/rbi/gems/connection_pool@2.4.1.rbi +0 -9
- data/sorbet/rbi/gems/crass@1.0.6.rbi +0 -623
- data/sorbet/rbi/gems/date@3.4.1.rbi +0 -75
- data/sorbet/rbi/gems/diff-lcs@1.5.1.rbi +0 -1131
- data/sorbet/rbi/gems/docile@1.4.1.rbi +0 -377
- data/sorbet/rbi/gems/drb@2.2.1.rbi +0 -1347
- data/sorbet/rbi/gems/erubi@1.13.0.rbi +0 -150
- data/sorbet/rbi/gems/globalid@1.2.1.rbi +0 -9
- data/sorbet/rbi/gems/i18n@1.14.6.rbi +0 -2359
- data/sorbet/rbi/gems/io-console@0.8.0.rbi +0 -9
- data/sorbet/rbi/gems/json@2.9.0.rbi +0 -1944
- data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +0 -14238
- data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +0 -240
- data/sorbet/rbi/gems/logger@1.6.3.rbi +0 -940
- data/sorbet/rbi/gems/loofah@2.23.1.rbi +0 -1081
- data/sorbet/rbi/gems/mail@2.8.1.rbi +0 -9
- data/sorbet/rbi/gems/marcel@1.0.4.rbi +0 -9
- data/sorbet/rbi/gems/method_source@1.1.0.rbi +0 -304
- data/sorbet/rbi/gems/mini_mime@1.1.5.rbi +0 -9
- data/sorbet/rbi/gems/minitest@5.25.4.rbi +0 -1547
- data/sorbet/rbi/gems/mocha@2.7.1.rbi +0 -12
- data/sorbet/rbi/gems/msgpack@1.7.5.rbi +0 -320
- data/sorbet/rbi/gems/net-imap@0.5.2.rbi +0 -9
- data/sorbet/rbi/gems/net-pop@0.1.2.rbi +0 -9
- data/sorbet/rbi/gems/net-protocol@0.2.2.rbi +0 -292
- data/sorbet/rbi/gems/net-smtp@0.5.0.rbi +0 -9
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +0 -159
- data/sorbet/rbi/gems/nio4r@2.7.4.rbi +0 -9
- data/sorbet/rbi/gems/nokogiri@1.17.2.rbi +0 -8201
- data/sorbet/rbi/gems/parallel@1.26.3.rbi +0 -291
- data/sorbet/rbi/gems/parser@3.3.6.0.rbi +0 -5519
- data/sorbet/rbi/gems/prism@1.2.0.rbi +0 -39085
- data/sorbet/rbi/gems/pry-byebug@3.10.1.rbi +0 -1151
- data/sorbet/rbi/gems/pry@0.14.2.rbi +0 -10076
- data/sorbet/rbi/gems/psych@5.2.1.rbi +0 -1785
- data/sorbet/rbi/gems/racc@1.8.1.rbi +0 -162
- data/sorbet/rbi/gems/rack-session@2.0.0.rbi +0 -727
- data/sorbet/rbi/gems/rack-test@2.1.0.rbi +0 -747
- data/sorbet/rbi/gems/rack@3.1.8.rbi +0 -4905
- data/sorbet/rbi/gems/rackup@2.2.1.rbi +0 -230
- data/sorbet/rbi/gems/rails-dom-testing@2.2.0.rbi +0 -758
- data/sorbet/rbi/gems/rails-html-sanitizer@1.6.2.rbi +0 -785
- data/sorbet/rbi/gems/rails@8.0.1.rbi +0 -9
- data/sorbet/rbi/gems/railties@8.0.1.rbi +0 -6347
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +0 -403
- data/sorbet/rbi/gems/rake@13.2.1.rbi +0 -3028
- data/sorbet/rbi/gems/rbi@0.2.1.rbi +0 -4535
- data/sorbet/rbi/gems/rdoc@6.9.1.rbi +0 -12593
- data/sorbet/rbi/gems/regexp_parser@2.9.3.rbi +0 -3772
- data/sorbet/rbi/gems/reline@0.6.0.rbi +0 -2454
- data/sorbet/rbi/gems/rexml@3.4.0.rbi +0 -4871
- data/sorbet/rbi/gems/rspec-core@3.13.2.rbi +0 -11284
- data/sorbet/rbi/gems/rspec-expectations@3.13.3.rbi +0 -8183
- data/sorbet/rbi/gems/rspec-mocks@3.13.2.rbi +0 -5341
- data/sorbet/rbi/gems/rspec-support@3.13.2.rbi +0 -1630
- data/sorbet/rbi/gems/rspec@3.13.0.rbi +0 -83
- data/sorbet/rbi/gems/rubocop-ast@1.37.0.rbi +0 -7713
- data/sorbet/rbi/gems/rubocop-md@1.2.4.rbi +0 -123
- data/sorbet/rbi/gems/rubocop-minitest@0.36.0.rbi +0 -2613
- data/sorbet/rbi/gems/rubocop-packaging@0.5.2.rbi +0 -388
- data/sorbet/rbi/gems/rubocop-performance@1.23.0.rbi +0 -9
- data/sorbet/rbi/gems/rubocop-rails@2.27.0.rbi +0 -9535
- data/sorbet/rbi/gems/rubocop@1.69.2.rbi +0 -59600
- data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +0 -1318
- data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +0 -9
- data/sorbet/rbi/gems/securerandom@0.4.1.rbi +0 -78
- data/sorbet/rbi/gems/simplecov-html@0.13.1.rbi +0 -225
- data/sorbet/rbi/gems/simplecov@0.22.0.rbi +0 -2149
- data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +0 -9
- data/sorbet/rbi/gems/spoom@1.5.0.rbi +0 -4932
- data/sorbet/rbi/gems/sqlite3@2.3.1.rbi +0 -1824
- data/sorbet/rbi/gems/standard-custom@1.0.2.rbi +0 -9
- data/sorbet/rbi/gems/standard-performance@1.6.0.rbi +0 -9
- data/sorbet/rbi/gems/standard@1.43.0.rbi +0 -926
- data/sorbet/rbi/gems/stringio@3.1.2.rbi +0 -9
- data/sorbet/rbi/gems/tapioca@0.16.4.rbi +0 -3597
- data/sorbet/rbi/gems/thor@1.3.2.rbi +0 -4378
- data/sorbet/rbi/gems/timeout@0.4.2.rbi +0 -151
- data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +0 -5918
- data/sorbet/rbi/gems/unicode-display_width@3.1.2.rbi +0 -130
- data/sorbet/rbi/gems/unicode-emoji@4.0.4.rbi +0 -251
- data/sorbet/rbi/gems/uri@1.0.2.rbi +0 -2377
- data/sorbet/rbi/gems/useragent@0.16.11.rbi +0 -9
- data/sorbet/rbi/gems/websocket-driver@0.7.6.rbi +0 -9
- data/sorbet/rbi/gems/websocket-extensions@0.1.5.rbi +0 -9
- data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +0 -435
- data/sorbet/rbi/gems/yard@0.9.37.rbi +0 -18504
- data/sorbet/rbi/gems/zeitwerk@2.7.1.rbi +0 -9
- data/sorbet/tapioca/config.yml +0 -13
- data/sorbet/tapioca/require.rb +0 -13
@@ -1,785 +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
|
-
|
8
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#14
|
9
|
-
module ActionView
|
10
|
-
class << self
|
11
|
-
# source://actionview/8.0.1/lib/action_view/deprecator.rb#4
|
12
|
-
def deprecator; end
|
13
|
-
|
14
|
-
# source://actionview/8.0.1/lib/action_view.rb#93
|
15
|
-
def eager_load!; end
|
16
|
-
|
17
|
-
# source://actionview/8.0.1/lib/action_view/gem_version.rb#5
|
18
|
-
def gem_version; end
|
19
|
-
|
20
|
-
# source://actionview/8.0.1/lib/action_view/version.rb#7
|
21
|
-
def version; end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#15
|
26
|
-
module ActionView::Helpers
|
27
|
-
include ::ActionView::Helpers::SanitizeHelper
|
28
|
-
include ::ActionView::Helpers::TextHelper
|
29
|
-
include ::ActionView::Helpers::UrlHelper
|
30
|
-
include ::ActionView::Helpers::SanitizeHelper
|
31
|
-
include ::ActionView::Helpers::TextHelper
|
32
|
-
include ::ActionView::Helpers::FormTagHelper
|
33
|
-
include ::ActionView::Helpers::FormHelper
|
34
|
-
include ::ActionView::Helpers::TranslationHelper
|
35
|
-
|
36
|
-
mixes_in_class_methods ::ActionView::Helpers::UrlHelper::ClassMethods
|
37
|
-
mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods
|
38
|
-
|
39
|
-
class << self
|
40
|
-
# source://actionview/8.0.1/lib/action_view/helpers.rb#35
|
41
|
-
def eager_load!; end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#16
|
46
|
-
module ActionView::Helpers::SanitizeHelper
|
47
|
-
mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods
|
48
|
-
|
49
|
-
# source://actionview/8.0.1/lib/action_view/helpers/sanitize_helper.rb#111
|
50
|
-
def sanitize(html, options = T.unsafe(nil)); end
|
51
|
-
|
52
|
-
# source://actionview/8.0.1/lib/action_view/helpers/sanitize_helper.rb#116
|
53
|
-
def sanitize_css(style); end
|
54
|
-
|
55
|
-
# source://actionview/8.0.1/lib/action_view/helpers/sanitize_helper.rb#12
|
56
|
-
def sanitizer_vendor; end
|
57
|
-
|
58
|
-
# source://actionview/8.0.1/lib/action_view/helpers/sanitize_helper.rb#12
|
59
|
-
def sanitizer_vendor=(val); end
|
60
|
-
|
61
|
-
# source://actionview/8.0.1/lib/action_view/helpers/sanitize_helper.rb#150
|
62
|
-
def strip_links(html); end
|
63
|
-
|
64
|
-
# source://actionview/8.0.1/lib/action_view/helpers/sanitize_helper.rb#133
|
65
|
-
def strip_tags(html); end
|
66
|
-
|
67
|
-
class << self
|
68
|
-
# source://actionview/8.0.1/lib/action_view/helpers/sanitize_helper.rb#12
|
69
|
-
def sanitizer_vendor; end
|
70
|
-
|
71
|
-
# source://actionview/8.0.1/lib/action_view/helpers/sanitize_helper.rb#12
|
72
|
-
def sanitizer_vendor=(val); end
|
73
|
-
end
|
74
|
-
end
|
75
|
-
|
76
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#17
|
77
|
-
module ActionView::Helpers::SanitizeHelper::ClassMethods
|
78
|
-
# source://actionview/8.0.1/lib/action_view/helpers/sanitize_helper.rb#175
|
79
|
-
def full_sanitizer; end
|
80
|
-
|
81
|
-
# source://actionview/8.0.1/lib/action_view/helpers/sanitize_helper.rb#155
|
82
|
-
def full_sanitizer=(_arg0); end
|
83
|
-
|
84
|
-
# source://actionview/8.0.1/lib/action_view/helpers/sanitize_helper.rb#185
|
85
|
-
def link_sanitizer; end
|
86
|
-
|
87
|
-
# source://actionview/8.0.1/lib/action_view/helpers/sanitize_helper.rb#155
|
88
|
-
def link_sanitizer=(_arg0); end
|
89
|
-
|
90
|
-
# source://actionview/8.0.1/lib/action_view/helpers/sanitize_helper.rb#195
|
91
|
-
def safe_list_sanitizer; end
|
92
|
-
|
93
|
-
# source://actionview/8.0.1/lib/action_view/helpers/sanitize_helper.rb#155
|
94
|
-
def safe_list_sanitizer=(_arg0); end
|
95
|
-
|
96
|
-
# source://actionview/8.0.1/lib/action_view/helpers/sanitize_helper.rb#165
|
97
|
-
def sanitized_allowed_attributes; end
|
98
|
-
|
99
|
-
# Replaces the allowed HTML attributes for the +sanitize+ helper.
|
100
|
-
#
|
101
|
-
# class Application < Rails::Application
|
102
|
-
# config.action_view.sanitized_allowed_attributes = ['onclick', 'longdesc']
|
103
|
-
# end
|
104
|
-
#
|
105
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#34
|
106
|
-
def sanitized_allowed_attributes=(attributes); end
|
107
|
-
|
108
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#47
|
109
|
-
def sanitized_allowed_css_keywords; end
|
110
|
-
|
111
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#48
|
112
|
-
def sanitized_allowed_css_keywords=(_); end
|
113
|
-
|
114
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#47
|
115
|
-
def sanitized_allowed_css_properties; end
|
116
|
-
|
117
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#48
|
118
|
-
def sanitized_allowed_css_properties=(_); end
|
119
|
-
|
120
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#47
|
121
|
-
def sanitized_allowed_protocols; end
|
122
|
-
|
123
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#48
|
124
|
-
def sanitized_allowed_protocols=(_); end
|
125
|
-
|
126
|
-
# source://actionview/8.0.1/lib/action_view/helpers/sanitize_helper.rb#161
|
127
|
-
def sanitized_allowed_tags; end
|
128
|
-
|
129
|
-
# Replaces the allowed tags for the +sanitize+ helper.
|
130
|
-
#
|
131
|
-
# class Application < Rails::Application
|
132
|
-
# config.action_view.sanitized_allowed_tags = 'table', 'tr', 'td'
|
133
|
-
# end
|
134
|
-
#
|
135
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#24
|
136
|
-
def sanitized_allowed_tags=(tags); end
|
137
|
-
|
138
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#47
|
139
|
-
def sanitized_bad_tags; end
|
140
|
-
|
141
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#48
|
142
|
-
def sanitized_bad_tags=(_); end
|
143
|
-
|
144
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#47
|
145
|
-
def sanitized_protocol_separator; end
|
146
|
-
|
147
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#48
|
148
|
-
def sanitized_protocol_separator=(_); end
|
149
|
-
|
150
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#47
|
151
|
-
def sanitized_shorthand_css_properties; end
|
152
|
-
|
153
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#48
|
154
|
-
def sanitized_shorthand_css_properties=(_); end
|
155
|
-
|
156
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#47
|
157
|
-
def sanitized_uri_attributes; end
|
158
|
-
|
159
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#48
|
160
|
-
def sanitized_uri_attributes=(_); end
|
161
|
-
|
162
|
-
# source://actionview/8.0.1/lib/action_view/helpers/sanitize_helper.rb#157
|
163
|
-
def sanitizer_vendor; end
|
164
|
-
|
165
|
-
private
|
166
|
-
|
167
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#52
|
168
|
-
def deprecate_option(name); end
|
169
|
-
end
|
170
|
-
|
171
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer/version.rb#3
|
172
|
-
module Rails
|
173
|
-
class << self
|
174
|
-
# source://railties/8.0.1/lib/rails.rb#44
|
175
|
-
def app_class; end
|
176
|
-
|
177
|
-
# source://railties/8.0.1/lib/rails.rb#44
|
178
|
-
def app_class=(_arg0); end
|
179
|
-
|
180
|
-
# source://railties/8.0.1/lib/rails.rb#45
|
181
|
-
def application; end
|
182
|
-
|
183
|
-
# source://railties/8.0.1/lib/rails.rb#43
|
184
|
-
def application=(_arg0); end
|
185
|
-
|
186
|
-
# source://railties/8.0.1/lib/rails.rb#126
|
187
|
-
def autoloaders; end
|
188
|
-
|
189
|
-
# source://railties/8.0.1/lib/rails.rb#56
|
190
|
-
def backtrace_cleaner; end
|
191
|
-
|
192
|
-
# source://railties/8.0.1/lib/rails.rb#44
|
193
|
-
def cache; end
|
194
|
-
|
195
|
-
# source://railties/8.0.1/lib/rails.rb#44
|
196
|
-
def cache=(_arg0); end
|
197
|
-
|
198
|
-
# source://railties/8.0.1/lib/rails.rb#52
|
199
|
-
def configuration; end
|
200
|
-
|
201
|
-
# source://railties/8.0.1/lib/rails/deprecator.rb#4
|
202
|
-
def deprecator; end
|
203
|
-
|
204
|
-
# source://railties/8.0.1/lib/rails.rb#75
|
205
|
-
def env; end
|
206
|
-
|
207
|
-
# source://railties/8.0.1/lib/rails.rb#82
|
208
|
-
def env=(environment); end
|
209
|
-
|
210
|
-
# source://railties/8.0.1/lib/rails.rb#93
|
211
|
-
def error; end
|
212
|
-
|
213
|
-
# source://railties/8.0.1/lib/rails/gem_version.rb#5
|
214
|
-
def gem_version; end
|
215
|
-
|
216
|
-
# source://railties/8.0.1/lib/rails.rb#106
|
217
|
-
def groups(*groups); end
|
218
|
-
|
219
|
-
# source://railties/8.0.1/lib/rails.rb#49
|
220
|
-
def initialize!(*_arg0, **_arg1, &_arg2); end
|
221
|
-
|
222
|
-
# source://railties/8.0.1/lib/rails.rb#49
|
223
|
-
def initialized?(*_arg0, **_arg1, &_arg2); end
|
224
|
-
|
225
|
-
# source://railties/8.0.1/lib/rails.rb#44
|
226
|
-
def logger; end
|
227
|
-
|
228
|
-
# source://railties/8.0.1/lib/rails.rb#44
|
229
|
-
def logger=(_arg0); end
|
230
|
-
|
231
|
-
# source://railties/8.0.1/lib/rails.rb#122
|
232
|
-
def public_path; end
|
233
|
-
|
234
|
-
# source://railties/8.0.1/lib/rails.rb#65
|
235
|
-
def root; end
|
236
|
-
|
237
|
-
# source://railties/8.0.1/lib/rails/version.rb#7
|
238
|
-
def version; end
|
239
|
-
end
|
240
|
-
end
|
241
|
-
|
242
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer/version.rb#4
|
243
|
-
module Rails::HTML; end
|
244
|
-
|
245
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#194
|
246
|
-
module Rails::HTML4; end
|
247
|
-
|
248
|
-
# == Rails::HTML4::FullSanitizer
|
249
|
-
#
|
250
|
-
# Removes all tags from HTML4 but strips out scripts, forms and comments.
|
251
|
-
#
|
252
|
-
# full_sanitizer = Rails::HTML4::FullSanitizer.new
|
253
|
-
# full_sanitizer.sanitize("<b>Bold</b> no more! <a href='more.html'>See more here</a>...")
|
254
|
-
# # => "Bold no more! See more here..."
|
255
|
-
#
|
256
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#225
|
257
|
-
class Rails::HTML4::FullSanitizer < ::Rails::HTML::Sanitizer
|
258
|
-
include ::Rails::HTML::Concern::ComposedSanitize
|
259
|
-
include ::Rails::HTML::Concern::Parser::HTML4
|
260
|
-
include ::Rails::HTML::Concern::Scrubber::Full
|
261
|
-
include ::Rails::HTML::Concern::Serializer::UTF8Encode
|
262
|
-
end
|
263
|
-
|
264
|
-
# == Rails::HTML4::LinkSanitizer
|
265
|
-
#
|
266
|
-
# Removes +a+ tags and +href+ attributes from HTML4 leaving only the link text.
|
267
|
-
#
|
268
|
-
# link_sanitizer = Rails::HTML4::LinkSanitizer.new
|
269
|
-
# link_sanitizer.sanitize('<a href="example.com">Only the link text will be kept.</a>')
|
270
|
-
# # => "Only the link text will be kept."
|
271
|
-
#
|
272
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#240
|
273
|
-
class Rails::HTML4::LinkSanitizer < ::Rails::HTML::Sanitizer
|
274
|
-
include ::Rails::HTML::Concern::ComposedSanitize
|
275
|
-
include ::Rails::HTML::Concern::Parser::HTML4
|
276
|
-
include ::Rails::HTML::Concern::Scrubber::Link
|
277
|
-
include ::Rails::HTML::Concern::Serializer::UTF8Encode
|
278
|
-
end
|
279
|
-
|
280
|
-
# == Rails::HTML4::SafeListSanitizer
|
281
|
-
#
|
282
|
-
# Sanitizes HTML4 and CSS from an extensive safe list.
|
283
|
-
#
|
284
|
-
# === Whitespace
|
285
|
-
#
|
286
|
-
# We can't make any guarantees about whitespace being kept or stripped. Loofah uses Nokogiri,
|
287
|
-
# which wraps either a C or Java parser for the respective Ruby implementation. Those two
|
288
|
-
# parsers determine how whitespace is ultimately handled.
|
289
|
-
#
|
290
|
-
# When the stripped markup will be rendered the users browser won't take whitespace into account
|
291
|
-
# anyway. It might be better to suggest your users wrap their whitespace sensitive content in
|
292
|
-
# pre tags or that you do so automatically.
|
293
|
-
#
|
294
|
-
# === Options
|
295
|
-
#
|
296
|
-
# Sanitizes both html and css via the safe lists found in
|
297
|
-
# Rails::HTML::Concern::Scrubber::SafeList
|
298
|
-
#
|
299
|
-
# SafeListSanitizer also accepts options to configure the safe list used when sanitizing html.
|
300
|
-
# There's a class level option:
|
301
|
-
#
|
302
|
-
# Rails::HTML4::SafeListSanitizer.allowed_tags = %w(table tr td)
|
303
|
-
# Rails::HTML4::SafeListSanitizer.allowed_attributes = %w(id class style)
|
304
|
-
#
|
305
|
-
# Tags and attributes can also be passed to +sanitize+. Passed options take precedence over the
|
306
|
-
# class level options.
|
307
|
-
#
|
308
|
-
# === Examples
|
309
|
-
#
|
310
|
-
# safe_list_sanitizer = Rails::HTML4::SafeListSanitizer.new
|
311
|
-
#
|
312
|
-
# # default: sanitize via a extensive safe list of allowed elements
|
313
|
-
# safe_list_sanitizer.sanitize(@article.body)
|
314
|
-
#
|
315
|
-
# # sanitize via the supplied tags and attributes
|
316
|
-
# safe_list_sanitizer.sanitize(
|
317
|
-
# @article.body,
|
318
|
-
# tags: %w(table tr td),
|
319
|
-
# attributes: %w(id class style),
|
320
|
-
# )
|
321
|
-
#
|
322
|
-
# # sanitize via a custom Loofah scrubber
|
323
|
-
# safe_list_sanitizer.sanitize(@article.body, scrubber: ArticleScrubber.new)
|
324
|
-
#
|
325
|
-
# # prune nodes from the tree instead of stripping tags and leaving inner content
|
326
|
-
# safe_list_sanitizer = Rails::HTML4::SafeListSanitizer.new(prune: true)
|
327
|
-
#
|
328
|
-
# # the sanitizer can also sanitize CSS
|
329
|
-
# safe_list_sanitizer.sanitize_css('background-color: #000;')
|
330
|
-
#
|
331
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#298
|
332
|
-
class Rails::HTML4::SafeListSanitizer < ::Rails::HTML::Sanitizer
|
333
|
-
include ::Rails::HTML::Concern::ComposedSanitize
|
334
|
-
include ::Rails::HTML::Concern::Parser::HTML4
|
335
|
-
include ::Rails::HTML::Concern::Scrubber::SafeList
|
336
|
-
include ::Rails::HTML::Concern::Serializer::UTF8Encode
|
337
|
-
|
338
|
-
class << self
|
339
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#145
|
340
|
-
def allowed_attributes; end
|
341
|
-
|
342
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#145
|
343
|
-
def allowed_attributes=(_arg0); end
|
344
|
-
|
345
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#144
|
346
|
-
def allowed_tags; end
|
347
|
-
|
348
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#144
|
349
|
-
def allowed_tags=(_arg0); end
|
350
|
-
end
|
351
|
-
end
|
352
|
-
|
353
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#195
|
354
|
-
module Rails::HTML4::Sanitizer
|
355
|
-
extend ::Rails::HTML4::Sanitizer::VendorMethods
|
356
|
-
end
|
357
|
-
|
358
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#196
|
359
|
-
module Rails::HTML4::Sanitizer::VendorMethods
|
360
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#197
|
361
|
-
def full_sanitizer; end
|
362
|
-
|
363
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#201
|
364
|
-
def link_sanitizer; end
|
365
|
-
|
366
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#205
|
367
|
-
def safe_list_sanitizer; end
|
368
|
-
|
369
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#209
|
370
|
-
def white_list_sanitizer; end
|
371
|
-
end
|
372
|
-
|
373
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#306
|
374
|
-
module Rails::HTML5; end
|
375
|
-
|
376
|
-
# == Rails::HTML5::FullSanitizer
|
377
|
-
#
|
378
|
-
# Removes all tags from HTML5 but strips out scripts, forms and comments.
|
379
|
-
#
|
380
|
-
# full_sanitizer = Rails::HTML5::FullSanitizer.new
|
381
|
-
# full_sanitizer.sanitize("<b>Bold</b> no more! <a href='more.html'>See more here</a>...")
|
382
|
-
# # => "Bold no more! See more here..."
|
383
|
-
#
|
384
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#335
|
385
|
-
class Rails::HTML5::FullSanitizer < ::Rails::HTML::Sanitizer
|
386
|
-
include ::Rails::HTML::Concern::ComposedSanitize
|
387
|
-
include ::Rails::HTML::Concern::Parser::HTML5
|
388
|
-
include ::Rails::HTML::Concern::Scrubber::Full
|
389
|
-
include ::Rails::HTML::Concern::Serializer::UTF8Encode
|
390
|
-
end
|
391
|
-
|
392
|
-
# == Rails::HTML5::LinkSanitizer
|
393
|
-
#
|
394
|
-
# Removes +a+ tags and +href+ attributes from HTML5 leaving only the link text.
|
395
|
-
#
|
396
|
-
# link_sanitizer = Rails::HTML5::LinkSanitizer.new
|
397
|
-
# link_sanitizer.sanitize('<a href="example.com">Only the link text will be kept.</a>')
|
398
|
-
# # => "Only the link text will be kept."
|
399
|
-
#
|
400
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#350
|
401
|
-
class Rails::HTML5::LinkSanitizer < ::Rails::HTML::Sanitizer
|
402
|
-
include ::Rails::HTML::Concern::ComposedSanitize
|
403
|
-
include ::Rails::HTML::Concern::Parser::HTML5
|
404
|
-
include ::Rails::HTML::Concern::Scrubber::Link
|
405
|
-
include ::Rails::HTML::Concern::Serializer::UTF8Encode
|
406
|
-
end
|
407
|
-
|
408
|
-
# == Rails::HTML5::SafeListSanitizer
|
409
|
-
#
|
410
|
-
# Sanitizes HTML5 and CSS from an extensive safe list.
|
411
|
-
#
|
412
|
-
# === Whitespace
|
413
|
-
#
|
414
|
-
# We can't make any guarantees about whitespace being kept or stripped. Loofah uses Nokogiri,
|
415
|
-
# which wraps either a C or Java parser for the respective Ruby implementation. Those two
|
416
|
-
# parsers determine how whitespace is ultimately handled.
|
417
|
-
#
|
418
|
-
# When the stripped markup will be rendered the users browser won't take whitespace into account
|
419
|
-
# anyway. It might be better to suggest your users wrap their whitespace sensitive content in
|
420
|
-
# pre tags or that you do so automatically.
|
421
|
-
#
|
422
|
-
# === Options
|
423
|
-
#
|
424
|
-
# Sanitizes both html and css via the safe lists found in
|
425
|
-
# Rails::HTML::Concern::Scrubber::SafeList
|
426
|
-
#
|
427
|
-
# SafeListSanitizer also accepts options to configure the safe list used when sanitizing html.
|
428
|
-
# There's a class level option:
|
429
|
-
#
|
430
|
-
# Rails::HTML5::SafeListSanitizer.allowed_tags = %w(table tr td)
|
431
|
-
# Rails::HTML5::SafeListSanitizer.allowed_attributes = %w(id class style)
|
432
|
-
#
|
433
|
-
# Tags and attributes can also be passed to +sanitize+. Passed options take precedence over the
|
434
|
-
# class level options.
|
435
|
-
#
|
436
|
-
# === Examples
|
437
|
-
#
|
438
|
-
# safe_list_sanitizer = Rails::HTML5::SafeListSanitizer.new
|
439
|
-
#
|
440
|
-
# # default: sanitize via a extensive safe list of allowed elements
|
441
|
-
# safe_list_sanitizer.sanitize(@article.body)
|
442
|
-
#
|
443
|
-
# # sanitize via the supplied tags and attributes
|
444
|
-
# safe_list_sanitizer.sanitize(
|
445
|
-
# @article.body,
|
446
|
-
# tags: %w(table tr td),
|
447
|
-
# attributes: %w(id class style),
|
448
|
-
# )
|
449
|
-
#
|
450
|
-
# # sanitize via a custom Loofah scrubber
|
451
|
-
# safe_list_sanitizer.sanitize(@article.body, scrubber: ArticleScrubber.new)
|
452
|
-
#
|
453
|
-
# # prune nodes from the tree instead of stripping tags and leaving inner content
|
454
|
-
# safe_list_sanitizer = Rails::HTML5::SafeListSanitizer.new(prune: true)
|
455
|
-
#
|
456
|
-
# # the sanitizer can also sanitize CSS
|
457
|
-
# safe_list_sanitizer.sanitize_css('background-color: #000;')
|
458
|
-
#
|
459
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#408
|
460
|
-
class Rails::HTML5::SafeListSanitizer < ::Rails::HTML::Sanitizer
|
461
|
-
include ::Rails::HTML::Concern::ComposedSanitize
|
462
|
-
include ::Rails::HTML::Concern::Parser::HTML5
|
463
|
-
include ::Rails::HTML::Concern::Scrubber::SafeList
|
464
|
-
include ::Rails::HTML::Concern::Serializer::UTF8Encode
|
465
|
-
|
466
|
-
class << self
|
467
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#145
|
468
|
-
def allowed_attributes; end
|
469
|
-
|
470
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#145
|
471
|
-
def allowed_attributes=(_arg0); end
|
472
|
-
|
473
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#144
|
474
|
-
def allowed_tags; end
|
475
|
-
|
476
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#144
|
477
|
-
def allowed_tags=(_arg0); end
|
478
|
-
end
|
479
|
-
end
|
480
|
-
|
481
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#307
|
482
|
-
class Rails::HTML5::Sanitizer
|
483
|
-
class << self
|
484
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#309
|
485
|
-
def full_sanitizer; end
|
486
|
-
|
487
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#313
|
488
|
-
def link_sanitizer; end
|
489
|
-
|
490
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#317
|
491
|
-
def safe_list_sanitizer; end
|
492
|
-
|
493
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#321
|
494
|
-
def white_list_sanitizer; end
|
495
|
-
end
|
496
|
-
end
|
497
|
-
|
498
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#33
|
499
|
-
module Rails::HTML::Concern; end
|
500
|
-
|
501
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#34
|
502
|
-
module Rails::HTML::Concern::ComposedSanitize
|
503
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#35
|
504
|
-
def sanitize(html, options = T.unsafe(nil)); end
|
505
|
-
end
|
506
|
-
|
507
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#43
|
508
|
-
module Rails::HTML::Concern::Parser; end
|
509
|
-
|
510
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#44
|
511
|
-
module Rails::HTML::Concern::Parser::HTML4
|
512
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#45
|
513
|
-
def parse_fragment(html); end
|
514
|
-
end
|
515
|
-
|
516
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#50
|
517
|
-
module Rails::HTML::Concern::Parser::HTML5
|
518
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#51
|
519
|
-
def parse_fragment(html); end
|
520
|
-
end
|
521
|
-
|
522
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#57
|
523
|
-
module Rails::HTML::Concern::Scrubber; end
|
524
|
-
|
525
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#58
|
526
|
-
module Rails::HTML::Concern::Scrubber::Full
|
527
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#59
|
528
|
-
def scrub(fragment, options = T.unsafe(nil)); end
|
529
|
-
end
|
530
|
-
|
531
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#64
|
532
|
-
module Rails::HTML::Concern::Scrubber::Link
|
533
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#65
|
534
|
-
def initialize; end
|
535
|
-
|
536
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#72
|
537
|
-
def scrub(fragment, options = T.unsafe(nil)); end
|
538
|
-
end
|
539
|
-
|
540
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#77
|
541
|
-
module Rails::HTML::Concern::Scrubber::SafeList
|
542
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#152
|
543
|
-
def initialize(prune: T.unsafe(nil)); end
|
544
|
-
|
545
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#169
|
546
|
-
def sanitize_css(style_string); end
|
547
|
-
|
548
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#156
|
549
|
-
def scrub(fragment, options = T.unsafe(nil)); end
|
550
|
-
|
551
|
-
private
|
552
|
-
|
553
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#178
|
554
|
-
def allowed_attributes(options); end
|
555
|
-
|
556
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#174
|
557
|
-
def allowed_tags(options); end
|
558
|
-
|
559
|
-
class << self
|
560
|
-
# @private
|
561
|
-
#
|
562
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#142
|
563
|
-
def included(klass); end
|
564
|
-
end
|
565
|
-
end
|
566
|
-
|
567
|
-
# The default safe list for attributes
|
568
|
-
#
|
569
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#126
|
570
|
-
Rails::HTML::Concern::Scrubber::SafeList::DEFAULT_ALLOWED_ATTRIBUTES = T.let(T.unsafe(nil), Set)
|
571
|
-
|
572
|
-
# The default safe list for tags
|
573
|
-
#
|
574
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#79
|
575
|
-
Rails::HTML::Concern::Scrubber::SafeList::DEFAULT_ALLOWED_TAGS = T.let(T.unsafe(nil), Set)
|
576
|
-
|
577
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#184
|
578
|
-
module Rails::HTML::Concern::Serializer; end
|
579
|
-
|
580
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#185
|
581
|
-
module Rails::HTML::Concern::Serializer::UTF8Encode
|
582
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#186
|
583
|
-
def serialize(fragment); end
|
584
|
-
end
|
585
|
-
|
586
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#418
|
587
|
-
Rails::HTML::FullSanitizer = Rails::HTML4::FullSanitizer
|
588
|
-
|
589
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#419
|
590
|
-
Rails::HTML::LinkSanitizer = Rails::HTML4::LinkSanitizer
|
591
|
-
|
592
|
-
# === Rails::HTML::PermitScrubber
|
593
|
-
#
|
594
|
-
# +Rails::HTML::PermitScrubber+ allows you to permit only your own tags and/or attributes.
|
595
|
-
#
|
596
|
-
# +Rails::HTML::PermitScrubber+ can be subclassed to determine:
|
597
|
-
# - When a node should be skipped via +skip_node?+.
|
598
|
-
# - When a node is allowed via +allowed_node?+.
|
599
|
-
# - When an attribute should be scrubbed via +scrub_attribute?+.
|
600
|
-
#
|
601
|
-
# Subclasses don't need to worry if tags or attributes are set or not.
|
602
|
-
# If tags or attributes are not set, Loofah's behavior will be used.
|
603
|
-
# If you override +allowed_node?+ and no tags are set, it will not be called.
|
604
|
-
# Instead Loofahs behavior will be used.
|
605
|
-
# Likewise for +scrub_attribute?+ and attributes respectively.
|
606
|
-
#
|
607
|
-
# Text and CDATA nodes are skipped by default.
|
608
|
-
# Unallowed elements will be stripped, i.e. element is removed but its subtree kept.
|
609
|
-
# Supplied tags and attributes should be Enumerables.
|
610
|
-
#
|
611
|
-
# +tags=+
|
612
|
-
# If set, elements excluded will be stripped.
|
613
|
-
# If not, elements are stripped based on Loofahs +HTML5::Scrub.allowed_element?+.
|
614
|
-
#
|
615
|
-
# +attributes=+
|
616
|
-
# If set, attributes excluded will be removed.
|
617
|
-
# If not, attributes are removed based on Loofahs +HTML5::Scrub.scrub_attributes+.
|
618
|
-
#
|
619
|
-
# class CommentScrubber < Rails::HTML::PermitScrubber
|
620
|
-
# def initialize
|
621
|
-
# super
|
622
|
-
# self.tags = %w(form script comment blockquote)
|
623
|
-
# end
|
624
|
-
#
|
625
|
-
# def skip_node?(node)
|
626
|
-
# node.text?
|
627
|
-
# end
|
628
|
-
#
|
629
|
-
# def scrub_attribute?(name)
|
630
|
-
# name == "style"
|
631
|
-
# end
|
632
|
-
# end
|
633
|
-
#
|
634
|
-
# See the documentation for +Nokogiri::XML::Node+ to understand what's possible
|
635
|
-
# with nodes: https://nokogiri.org/rdoc/Nokogiri/XML/Node.html
|
636
|
-
#
|
637
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#49
|
638
|
-
class Rails::HTML::PermitScrubber < ::Loofah::Scrubber
|
639
|
-
# @return [PermitScrubber] a new instance of PermitScrubber
|
640
|
-
#
|
641
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#52
|
642
|
-
def initialize(prune: T.unsafe(nil)); end
|
643
|
-
|
644
|
-
# Returns the value of attribute attributes.
|
645
|
-
#
|
646
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#50
|
647
|
-
def attributes; end
|
648
|
-
|
649
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#62
|
650
|
-
def attributes=(attributes); end
|
651
|
-
|
652
|
-
# Returns the value of attribute prune.
|
653
|
-
#
|
654
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#50
|
655
|
-
def prune; end
|
656
|
-
|
657
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#66
|
658
|
-
def scrub(node); end
|
659
|
-
|
660
|
-
# Returns the value of attribute tags.
|
661
|
-
#
|
662
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#50
|
663
|
-
def tags; end
|
664
|
-
|
665
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#58
|
666
|
-
def tags=(tags); end
|
667
|
-
|
668
|
-
protected
|
669
|
-
|
670
|
-
# @return [Boolean]
|
671
|
-
#
|
672
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#83
|
673
|
-
def allowed_node?(node); end
|
674
|
-
|
675
|
-
# @return [Boolean]
|
676
|
-
#
|
677
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#95
|
678
|
-
def keep_node?(node); end
|
679
|
-
|
680
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#162
|
681
|
-
def scrub_attribute(node, attr_node); end
|
682
|
-
|
683
|
-
# @return [Boolean]
|
684
|
-
#
|
685
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#91
|
686
|
-
def scrub_attribute?(name); end
|
687
|
-
|
688
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#112
|
689
|
-
def scrub_attributes(node); end
|
690
|
-
|
691
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#128
|
692
|
-
def scrub_css_attribute(node); end
|
693
|
-
|
694
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#103
|
695
|
-
def scrub_node(node); end
|
696
|
-
|
697
|
-
# @return [Boolean]
|
698
|
-
#
|
699
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#87
|
700
|
-
def skip_node?(node); end
|
701
|
-
|
702
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#137
|
703
|
-
def validate!(var, name); end
|
704
|
-
end
|
705
|
-
|
706
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#420
|
707
|
-
Rails::HTML::SafeListSanitizer = Rails::HTML4::SafeListSanitizer
|
708
|
-
|
709
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer/version.rb#5
|
710
|
-
class Rails::HTML::Sanitizer
|
711
|
-
extend ::Rails::HTML4::Sanitizer::VendorMethods
|
712
|
-
|
713
|
-
# @raise [NotImplementedError]
|
714
|
-
#
|
715
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#18
|
716
|
-
def sanitize(html, options = T.unsafe(nil)); end
|
717
|
-
|
718
|
-
private
|
719
|
-
|
720
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#28
|
721
|
-
def properly_encode(fragment, options); end
|
722
|
-
|
723
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#23
|
724
|
-
def remove_xpaths(node, xpaths); end
|
725
|
-
|
726
|
-
class << self
|
727
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#13
|
728
|
-
def best_supported_vendor; end
|
729
|
-
|
730
|
-
# @return [Boolean]
|
731
|
-
#
|
732
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#7
|
733
|
-
def html5_support?; end
|
734
|
-
end
|
735
|
-
end
|
736
|
-
|
737
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer/version.rb#6
|
738
|
-
Rails::HTML::Sanitizer::VERSION = T.let(T.unsafe(nil), String)
|
739
|
-
|
740
|
-
# === Rails::HTML::TargetScrubber
|
741
|
-
#
|
742
|
-
# Where +Rails::HTML::PermitScrubber+ picks out tags and attributes to permit in
|
743
|
-
# sanitization, +Rails::HTML::TargetScrubber+ targets them for removal.
|
744
|
-
#
|
745
|
-
# +tags=+
|
746
|
-
# If set, elements included will be stripped.
|
747
|
-
#
|
748
|
-
# +attributes=+
|
749
|
-
# If set, attributes included will be removed.
|
750
|
-
#
|
751
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#195
|
752
|
-
class Rails::HTML::TargetScrubber < ::Rails::HTML::PermitScrubber
|
753
|
-
# @return [Boolean]
|
754
|
-
#
|
755
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#196
|
756
|
-
def allowed_node?(node); end
|
757
|
-
|
758
|
-
# @return [Boolean]
|
759
|
-
#
|
760
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#200
|
761
|
-
def scrub_attribute?(name); end
|
762
|
-
end
|
763
|
-
|
764
|
-
# === Rails::HTML::TextOnlyScrubber
|
765
|
-
#
|
766
|
-
# +Rails::HTML::TextOnlyScrubber+ allows you to permit text nodes.
|
767
|
-
#
|
768
|
-
# Unallowed elements will be stripped, i.e. element is removed but its subtree kept.
|
769
|
-
#
|
770
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#210
|
771
|
-
class Rails::HTML::TextOnlyScrubber < ::Loofah::Scrubber
|
772
|
-
# @return [TextOnlyScrubber] a new instance of TextOnlyScrubber
|
773
|
-
#
|
774
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#211
|
775
|
-
def initialize; end
|
776
|
-
|
777
|
-
# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#215
|
778
|
-
def scrub(node); end
|
779
|
-
end
|
780
|
-
|
781
|
-
# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#421
|
782
|
-
Rails::HTML::WhiteListSanitizer = Rails::HTML4::SafeListSanitizer
|
783
|
-
|
784
|
-
# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#11
|
785
|
-
Rails::Html = Rails::HTML
|