fix tag detection when using content that gets html-escaped