diff --git a/org/html.go b/org/html.go index e58e39e..575cde3 100644 --- a/org/html.go +++ b/org/html.go @@ -58,13 +58,6 @@ func (w *HTMLWriter) before(d *Document) {} func (w *HTMLWriter) after(d *Document) { w.writeFootnotes(d) - w.replaceHTMLEntities(d) -} - -func (w *HTMLWriter) replaceHTMLEntities(d *Document) { - s := w.stringBuilder.String() - w.stringBuilder.Reset() - w.stringBuilder.WriteString(htmlEntityReplacer.Replace(s)) } func (w *HTMLWriter) writeNodes(ns ...Node) { @@ -188,7 +181,7 @@ func (w *HTMLWriter) writeHeadline(h Headline) { } func (w *HTMLWriter) writeText(t Text) { - w.WriteString(html.EscapeString(t.Content)) + w.WriteString(html.EscapeString(htmlEntityReplacer.Replace(t.Content))) } func (w *HTMLWriter) writeEmphasis(e Emphasis) {