- 25 11月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
It should be part of the documented public API, since we have an entire section of the guides dedicated to it. Documented in a way that addresses the concerns which kept it undocumented in the past.
-
- 25 10月, 2014 1 次提交
-
-
由 Akira Matsuda 提交于
-
- 03 7月, 2014 2 次提交
-
-
由 Godfrey Chan 提交于
-
由 John F. Douthat 提交于
(This is a manual merge of #9102)
-
- 03 6月, 2014 3 次提交
-
-
由 Aaron Patterson 提交于
before this change, we were allocating AS::SafeBuffer objects that were being interpolated in to a string, so the safe buffer object was being thrown away. This change only allocates a string (vs a string *and* a safebuffer) and interpolates the string. On my test application, this reduced the AS::SafeBuffer objects from 1527k per request to about 500 per request.
-
由 Aaron Patterson 提交于
html_escape_interpolated_argument is only used in mutation methods: https://github.com/rails/rails/blob/c07d09559ec171e1904b55c7ad7e8c7d586ca51b/activesupport/lib/active_support/core_ext/string/output_safety.rb#L174 https://github.com/rails/rails/blob/c07d09559ec171e1904b55c7ad7e8c7d586ca51b/activesupport/lib/active_support/core_ext/string/output_safety.rb#L179 The return value doesn't need to be converted to an AS::SafeBuffer since we know that the current object is an AS::SafeBuffer and will be mutated, and the return value from html_escape_interpolated_argument will be thrown away
-
由 Aaron Patterson 提交于
-
- 03 4月, 2014 1 次提交
-
-
由 Carlos Antonio da Silva 提交于
Change to require all active_support/deprecation since that's the actual entry point for the deprecation methods.
-
- 02 4月, 2014 1 次提交
-
-
由 Pavel Pravosud 提交于
-
- 01 4月, 2014 1 次提交
-
-
由 Pavel Pravosud 提交于
Make `#prepend` method modify instance in-place and return self instead of just returning modified value. That is exactly what `#prepend!` method was doing previously, so it's deprecated from now on.
-
- 10 1月, 2014 1 次提交
-
-
由 Jon Jensen 提交于
The behavior of json_escape was fixed in 2f1c5789, but the doc changes and example in that commit incorrectly indicated that the return value would be html-safe. Since quotation marks are preserved, the raw value is not safe to use in other contexts (specifically HTML attributes).
-
- 14 12月, 2013 1 次提交
-
-
由 Julien Letessier 提交于
Interpolation was untested and did not work with hash arguments. Adds - support for interpolation with hash argument - tests for the above - tests for safe/unsafe interpolation
-
- 05 12月, 2013 5 次提交
-
-
由 Carlos Antonio da Silva 提交于
-
由 Godfrey Chan 提交于
-
由 Godfrey Chan 提交于
-
由 Godfrey Chan 提交于
-
由 Godfrey Chan 提交于
-
- 03 12月, 2013 1 次提交
-
-
由 Carlos Antonio da Silva 提交于
Use the already existing strings instead of creating a new one each time just to test if it responds to the methods.
-
- 16 5月, 2013 1 次提交
-
-
由 Rafael Mendonça França 提交于
This reverts commit 8ce3c1e5, reversing changes made to f93da579. Reason: It slow down the running time. require "diffbench" load 'output_safety.rb' N = 10000 b = ActiveSupport::SafeBuffer.new("hello world") DiffBench.bm do report "capitalize in safe buffer" do N.times do b.capitalize end end end > git checkout 069ea45c; diffbench bench.rb; diffbench bench.rb;diffbench bench.rb;diffbench bench.rb;diffbench bench.rb;diffbench bench.rb;diffbench bench.rb; Running benchmark with current working tree Checkout HEAD^ Running benchmark with HEAD^ Checkout to previous HEAD again user system total real ----------------------------------capitalize in safe buffer After patch: 0.010000 0.000000 0.010000 ( 0.009733) Before patch: 0.010000 0.000000 0.010000 ( 0.007702) Improvement: -26% Running benchmark with current working tree Checkout HEAD^ Running benchmark with HEAD^ Checkout to previous HEAD again user system total real ----------------------------------capitalize in safe buffer After patch: 0.010000 0.000000 0.010000 ( 0.009768) Before patch: 0.010000 0.000000 0.010000 ( 0.007896) Improvement: -24% Running benchmark with current working tree Checkout HEAD^ Running benchmark with HEAD^ Checkout to previous HEAD again user system total real ----------------------------------capitalize in safe buffer After patch: 0.010000 0.000000 0.010000 ( 0.009938) Before patch: 0.010000 0.000000 0.010000 ( 0.007768) Improvement: -28% Running benchmark with current working tree Checkout HEAD^ Running benchmark with HEAD^ Checkout to previous HEAD again user system total real ----------------------------------capitalize in safe buffer After patch: 0.010000 0.000000 0.010000 ( 0.010001) Before patch: 0.010000 0.000000 0.010000 ( 0.007873) Improvement: -27% Running benchmark with current working tree Checkout HEAD^ Running benchmark with HEAD^ Checkout to previous HEAD again user system total real ----------------------------------capitalize in safe buffer After patch: 0.010000 0.000000 0.010000 ( 0.009670) Before patch: 0.010000 0.000000 0.010000 ( 0.007800) Improvement: -24% Running benchmark with current working tree Checkout HEAD^ Running benchmark with HEAD^ Checkout to previous HEAD again user system total real ----------------------------------capitalize in safe buffer After patch: 0.010000 0.000000 0.010000 ( 0.009949) Before patch: 0.010000 0.000000 0.010000 ( 0.007752) Improvement: -28%
-
- 14 5月, 2013 2 次提交
-
-
由 aditya-kapoor 提交于
-
由 aditya-kapoor 提交于
-
- 05 3月, 2013 1 次提交
-
-
由 Aman Gupta 提交于
-
- 13 9月, 2012 1 次提交
-
-
由 Francesco Rodriguez 提交于
-
- 09 9月, 2012 1 次提交
-
-
由 Kalys Osmonov 提交于
-
- 01 8月, 2012 1 次提交
-
- 24 5月, 2012 1 次提交
-
- 20 5月, 2012 1 次提交
-
-
由 Henrik Hodne 提交于
For future reference, this is the regex I used: ^\s*#\s*\n(?!\s*#). Replace with the first match, and voilà! Note that the regex matches a little bit too much, so you probably want to `git add -i .` and go through every single diff to check if it actually should be changed.
-
- 18 5月, 2012 1 次提交
-
-
由 Vasiliy Ermolovich 提交于
-
- 17 5月, 2012 1 次提交
-
-
由 Vasiliy Ermolovich 提交于
-
- 12 5月, 2012 1 次提交
-
-
由 Francesco Rodriguez 提交于
-
- 29 4月, 2012 2 次提交
-
-
由 Alexey Gaziev 提交于
-
由 Alexey Gaziev 提交于
-
- 02 3月, 2012 1 次提交
-
-
由 Carlos Antonio da Silva 提交于
Logic in clone_empty method was dealing with old @dirty variable, which has changed by @html_safe in this commit: https://github.com/rails/rails/commit/139963c99a955520db6373343662e55f4d16dcd1 This was issuing a "not initialized variable" warning - related to: https://github.com/rails/rails/pull/5237 The logic applied by this method is already handled by the [] override, so there is no need to reset the variable here.
-
- 01 3月, 2012 1 次提交
-
-
由 José Valim 提交于
-
- 21 2月, 2012 2 次提交
-
-
由 Akira Matsuda 提交于
-
由 Akira Matsuda 提交于
-
- 02 2月, 2012 1 次提交
-
-
由 Vijay Dev 提交于
-
- 01 2月, 2012 2 次提交
-
-
由 Carlos Antonio da Silva 提交于
-
由 Carlos Antonio da Silva 提交于
All the logic is based on the HTML_ESCAPE constant available in ERB::Util, so it seems more logic to have the entire method there and just delegate the helper to use it.
-
- 05 1月, 2012 1 次提交
-
-
由 Rafael Mendonça França 提交于
-