This fixes escaping for '#' in particular. Closes #7726.
#
See #6259.
<
|
instead of entities. Closes #7208.