summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt <kurt.w.jung@gmail.com>2019-09-25 21:45:01 -0400
committerKurt <kurt.w.jung@gmail.com>2019-09-25 21:45:01 -0400
commit648efaf66fc0b2c166ecb8b51fe68bcb0395c840 (patch)
tree941d9f065094d8257752f80b15089f9eb8321ab1
parentcae7d4739e815a170819d84c5361b05306b2f019 (diff)
Use strings.Replace instead of strings.ReplaceAll for older library support
-rw-r--r--util.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/util.go b/util.go
index 22e5f36..351d319 100644
--- a/util.go
+++ b/util.go
@@ -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
}