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.