Solution posted for Mathjax integration clashes with safeHTML encoding

The solution on how to integrate Mathjax with Hugo posted here:

Recommends adding two script tags with type defined as
script type="text/x-mathjax-config"

The problem I faced was that the code specified inside those script tags gets encoded as safeHTML
e.g. the for loop of the second script tag is encoded from
for(i = 0; i < all.length; i += 1)

for(i = 0; i &lt; all.length; i += 1)

Which was quite painful to debug, and the solution I’m using at the moment is
for(var i = 0; i {{ "<" | safeHTML }} all.length; i++)

Did I miss something or that specific part of the docs is missing the implicit encoding of the “<” character?