Fixes #1646 HTML entities not escaped in links when HTML is enabled