CodeMirror: Entities turned into HTML tag in HTML mode

428 views Asked by At

When specifying for example a line of HTML as follows:

<dt><code>&lt;dl&gt;</code></dt>

CodeMirror will convert the entities to their tag equivalent i.e.

<dt><code><dl></code></dt>

NOTE: This is when CodeMirror is initialised and the first passed as the initial editor content. So it does not happen as you type.

Is there a way to prevent this from happening? Perhaps a config, plugin, or custom function. I have looked over the documentation and does not look like there is anything. Thank you in advance

1

There are 1 answers

0
schalkneethling On

This is not caused by CodeMirror but parsing by the browser before the content is sent to the editor :-/