fix regression of #1736, improve test

after #1736 it was not possible to render textareas with safe html content (html tags)