HTML closing tag auto converts to a dash

When trying to include HTML as plain text in a rem, the left angle bracket and forward slash are auto converted to a dash (horizontal bar). Why? Is there a way to prevent this?

Example:

<p>Hello, World!</p>
Turns into
<p>Hello, World!―p>

At the moment, </> → is only allowed in the inline quote now because /> is performed as card arrow