Comment on Rails XSS vulnerability in number formatting (CVE-2014-0081)parentComments−wilg12yThe view-dependent stuff is in fact separated from the business conversion logic and can be used in a non-web context if you want.Here's the version for use in a view context: https://github.com/rails/rails/blob/master/actionview/lib/ac...You can see that this method has some XSS prevention logic.Here's the converter itself: https://github.com/rails/rails/blob/master/activesupport/lib...
Comments
The view-dependent stuff is in fact separated from the business conversion logic and can be used in a non-web context if you want.
Here's the version for use in a view context: https://github.com/rails/rails/blob/master/actionview/lib/ac...
You can see that this method has some XSS prevention logic.
Here's the converter itself: https://github.com/rails/rails/blob/master/activesupport/lib...