1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionview/lib/action_view
Sean Doyle d2e07395b3 ActionView: Serialize Regexp into HTML attribute
When serializing a Regexp instance, encode the [Regexp#source][]. When
encoding a value into a [pattern][] attribute from ERB/Ruby, declaring
the String can be tedious. For example, one might attempt to encode
`\w+` as `"\\\w+"`, but once serialized to the browser, that is not
equivalent to the `"\w+"` HTML attribute.

Instead, enable declaring Regexp and Regexp literals as attributes, and
encoding them as their source String.

[Regexp#source]: https://ruby-doc.org/core-2.7.2/Regexp.html#method-i-source
[pattern]: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern
2020-11-26 17:52:26 -05:00
..
helpers ActionView: Serialize Regexp into HTML attribute 2020-11-26 17:52:26 -05:00
locale
renderer Remove deprecated support to passing absolute paths to render template: 2020-10-30 00:25:15 +00:00
tasks
template Remove deprecated escape_whitelist from ActionView::Template::Handlers::ERB 2020-10-30 00:25:30 +00:00
testing Remove deprecated pattern argument in ActionView::Template::PathResolver 2020-10-30 00:25:13 +00:00
base.rb Disentangle Action Text from ApplicationController 2020-10-30 01:01:42 +00:00
buffers.rb
cache_expiry.rb Reduce allocations in action_view cache expiry 2020-05-22 18:38:56 -04:00
context.rb Remove redundant @virtual_path variable 2020-05-26 15:53:11 -04:00
dependency_tracker.rb Prefer no allocation start/end_with? over String#[] == 2020-05-29 10:20:13 +09:00
digestor.rb Skip interpolated strings in AV::Digestor 2020-05-17 15:06:17 -07:00
flows.rb
gem_version.rb Preparing for 6.1.0.rc1 release 2020-11-02 21:12:47 +00:00
helpers.rb Simply require rather than autoload + immediately load below 2020-11-26 23:27:22 +09:00
layouts.rb
log_subscriber.rb
lookup_context.rb Remove deprecated rendered_format from ActionView::LookupContext 2020-10-30 00:25:26 +00:00
model_naming.rb
path_set.rb Remove deprecated find_file from ActionView::PathSet 2020-10-30 00:25:27 +00:00
railtie.rb Remove deprecated finalize_compiled_template_methods 2020-10-30 00:25:16 +00:00
record_identifier.rb
rendering.rb Revert "Raise when calling render with invalid options" 2020-10-29 13:49:30 -07:00
routing_url_for.rb URL helper methods are public 2020-10-02 14:20:58 +09:00
template.rb Remove deprecated ActionView::Template#refresh 2020-10-30 00:25:21 +00:00
test_case.rb Avoid creating helper modules until modified 2020-09-08 16:55:53 -07:00
unbound_template.rb
version.rb
view_paths.rb