From 648efaf66fc0b2c166ecb8b51fe68bcb0395c840 Mon Sep 17 00:00:00 2001 From: Kurt Date: Wed, 25 Sep 2019 21:45:01 -0400 Subject: Use strings.Replace instead of strings.ReplaceAll for older library support --- util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 } -- cgit v1.2.1-24-ge1ad