Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Floats not html_safe? #1935

Closed
tekwiz opened this issue Jul 2, 2011 · 3 comments
Closed

Floats not html_safe? #1935

tekwiz opened this issue Jul 2, 2011 · 3 comments

Comments

@tekwiz
Copy link

tekwiz commented Jul 2, 2011

I noticed that only Integers are considered html_safe; shouldn't floats be considered html_safe as well?

@dmathieu
Copy link
Contributor

dmathieu commented Jul 3, 2011

All numeric classes actually :)

@tekwiz
Copy link
Author

tekwiz commented Jul 3, 2011

Are we sure all numerics should be safe? Not being a mathematician, this may be an ignorant assertion, but I could see some subclasses of Numeric (probably custom subclasses) having unsafe characters such as the exponential symbol, the power-of-10 symbol, or the Unicode times symbol.

@dmathieu
Copy link
Contributor

dmathieu commented Jul 3, 2011

Numeric has 4 native child classes : Bignum, Float, Fixnum, Integer.
All of these should be html_safe. For any other specific one, the method can be overriden.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants