Fixes #4369: Properly encodes markup in textareas

With this change you can now include write posts about XML/HTML and re-edit them without having the content mangled.