George Edwards
George Edwards

Reputation: 9229

inValid html - unexpected closing tag `</code>`

The following code snippet was generated by the marked markdown renderer, and is included in my angular 2 template.

<code>
@import { url(&#39;~/platform.css&#39;) };
</code>

However, it throws the following error:

Unexpected closing tag "code" ("
<code>
@import { url(&#39;~/platform.css&#39;) };
[ERROR ->]</code>

What is wrong with that code?

Upvotes: 3

Views: 169

Answers (1)

G&#252;nter Z&#246;chbauer
G&#252;nter Z&#246;chbauer

Reputation: 657741

I think you need to encode the content like

<code>
{{'@import { url(&#39;~/platform.css&#39;) };'}}
<code>

if it contains { or }

Upvotes: 2

Related Questions