Welcome to mirror list, hosted at ThFree Co, Russian Federation.

escape_quotes.go « artifacts « internal « workhorse - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 94db2be39b70bee6d793bb4a6d5adcd36d32b21d (plain)
1
2
3
4
5
6
7
8
9
10
package artifacts

import "strings"

// taken from mime/multipart/writer.go
var quoteEscaper = strings.NewReplacer("\\", "\\\\", `"`, "\\\"")

func escapeQuotes(s string) string {
	return quoteEscaper.Replace(s)
}