1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

5 commits

Author SHA1 Message Date
Juanjo Bazán
60062cf39a Fix AS::NumberHelper results with rationals
:precision was incorrectly being applied to Rationals

before:
  ActiveSupport::NumberHelper.number_to_rounded Rational(10, 3), precision: 2
  => "3.3"
after:
  ActiveSupport::NumberHelper.number_to_rounded Rational(10, 3), precision: 2
  => "3.33"
2014-05-31 20:07:47 +02:00
Yves Senn
378c8d2c99 fix number_to_percentage with Float::NAN, Float::INFINITY.
Closes #14405.

This is a follow-up to 9e997e9039 to restore
the documented behavior.
2014-03-17 10:55:21 +01:00
Rafael Mendonça França
08d0a11a3f Escape format, negative_format and units options of number helpers
Previously the values of these options were trusted leading to
potential XSS vulnerabilities.

Fixes: CVE-2014-0081
2014-02-18 15:38:50 -03:00
Michael Koziarski
b31a7a6f1e Escape the unit value provided to number_to_currency
Previously the unit values were trusted leading to potential XSS vulnerabilities.

Fixes: CVE-2013-6415
2013-12-02 16:41:14 -08:00
Piotr Sarnacki
eb23754ebb Move template tests from actionpack to actionview 2013-06-20 17:23:16 +02:00
Renamed from actionpack/test/template/number_helper_test.rb (Browse further)