mathiasbynens / he

A robust HTML entity encoder/decoder written in JavaScript.
https://mths.be/he
MIT License
3.43k stars 255 forks source link

Option for decimal output #32

Closed akobler closed 8 years ago

akobler commented 9 years ago

Hi

Thanks for the great library! I had the need to encode HTML entities to the decimal format instead of hexadecimal format. Please review the changes. Are additional test cases necessary? As I am not an expert in HTML entities, I can not really judge about corner cases that must be tested.

Thanks for reviewing and (hopefully) merging back.

Andi

akobler commented 9 years ago

The option might be renamed to useDecimalReferences? (to be in line with useNamedReferences)

mathiasbynens commented 9 years ago

Thanks for the patch.

The new setting should also be documented (README.md). Once that + the comments I left are addressed, this can be merged.

akobler commented 9 years ago

Thanks for reviewing! All your comments are applied. I fixed the above mentioned failing unit test last week (was really a bug, my changes were not consistent). From my point of view, everything should be OK. Let me know if something is still missing or if the changes can be merged back.

mathiasbynens commented 9 years ago

Thanks. Could you squash your commits please?

akobler commented 9 years ago

What's wrong with the last commit? I followed the instructions here: https://github.com/ginatrapani/todo.txt-android/wiki/Squash-All-Commits-Related-to-a-Single-Issue-into-a-Single-Commit

Did I miss something?

akobler commented 9 years ago

just fixed your comments

mathiasbynens commented 8 years ago

Reviewed + amended your patch and merged it. Thanks!