Michel Keijzers
Michel Keijzers

Reputation: 15357

How to escape < and > in YAML/Jekyll?

I'm trying to escape the characters < and >, e.g. in:

description: "some file <x> bla bla"

Note: x should be generated literally. The generated HTML code always generates a <li> and/or <ul>, because of the < and >, which clearly should not happen.

What I tried is:

Upvotes: 3

Views: 420

Answers (1)

Mureinik
Mureinik

Reputation: 311338

HTML escaping should do the trick:

description: "some file &lt;x&gt; bla bla"

Upvotes: 3

Related Questions