htmlTag
We previously failed on cases where an attribute contained a `>` character. This patch fixes the bug. Closes #3989.