rewrite fixes: html_rewriter do not unescape attrs!
rules: don't rewrite past end of block or line