Fix #24, handle numbers in html method

I tested the performance of different methods right here, but at the end it seems like it doesn't make a significant difference. I would suggest to do it this way (it also enables us to add more datatypes later on)

If something needs to be changed, ping me ;-)