Fixed unsafe attributes.
Added character unescaping
Added tests. See #4