Fixes html escaping issues. NOTE: this is a very hacky, dirty fix and it must be made clean.