Skip to content

Commit

Permalink
Use strings.Replace instead of strings.ReplaceAll for older library s…
Browse files Browse the repository at this point in the history
…upport
  • Loading branch information
jung-kurt committed Sep 26, 2019
1 parent cae7d47 commit 648efaf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ func isChinese(rune2 rune) bool {
// Condition font family string to PDF name compliance. See section 5.3 (Names)
// in https://resources.infosecinstitute.com/pdf-file-format-basic-structure/
func fontFamilyEscape(familyStr string) (escStr string) {
escStr = strings.ReplaceAll(familyStr, " ", "#20")
escStr = strings.Replace(familyStr, " ", "#20", -1)
// Additional replacements can take place here
return
}

0 comments on commit 648efaf

Please sign in to comment.