Add naive html escaping to generate-gh-pages

without this the raw html from the org source (e.g. from a #+HTML: ... keyword)
is not visible as text but rendered as html
This commit is contained in:
Niklas Fasching 2018-12-11 20:51:45 +01:00
parent ffe06b50f2
commit 8a30adf1f2

View file

@ -21,7 +21,7 @@ for org_file in $org_files; do
content+=" content+="
<h2><a id='${name}' href='#toc-${name}'>${name}</a></h2> <h2><a id='${name}' href='#toc-${name}'>${name}</a></h2>
<div class='source'> <div class='source'>
<pre class='org'>$(cat $org_file)</pre> <pre class='org'>$(sed 's/&/\&amp;/g; s/</\&lt;/g; s/>/\&gt;/g;' $org_file)</pre>
<div class='html'>$(./go-org $org_file html-chroma)</div> <div class='html'>$(./go-org $org_file html-chroma)</div>
</div>" </div>"
done done