fix my reported bug (v1.0 destroy formated text)

1. Not destroy formated text: traverse all DOM changing only text, not tags.
2. Use UTF8-safe functions.
Merge pull request #3 from ppKrauss/patch-1

Peter's reported bug is fixed by himself (v1.0 destroy formated text) Thanks Peter!