Skip to content

Commit

Permalink
feat: re-add html escaping
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasjarosch committed Aug 25, 2023
1 parent dfa2311 commit ec3bf4a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions replace.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"bytes"
"errors"
"fmt"
"html"
"strings"
"sync"
)
Expand Down Expand Up @@ -55,8 +56,7 @@ func (r *Replacer) Replace(placeholderKey string, value string) error {

// ensure html escaping of special chars
// reassign to prevent overwriting the actual value which would cause multiple-escapes
//tmpVal := html.EscapeString(value)
tmpVal := value
tmpVal := html.EscapeString(value)
valueInBytes := bytes.Replace(
[]byte(tmpVal),
[]byte("\n"), []byte("</w:t><w:br/><w:t>"), -1)
Expand Down

0 comments on commit ec3bf4a

Please sign in to comment.