mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-11 13:18:53 +00:00
drive: rewrite LOCK paths
Fixes #12097 Signed-off-by: Percy Wegmann <percy@tailscale.com>
This commit is contained in:

committed by
Percy Wegmann

parent
87f00d76c4
commit
59848fe14b
16
drive/driveimpl/shared/xml.go
Normal file
16
drive/driveimpl/shared/xml.go
Normal file
@@ -0,0 +1,16 @@
|
||||
// Copyright (c) Tailscale Inc & AUTHORS
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
package shared
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/xml"
|
||||
)
|
||||
|
||||
// EscapeForXML escapes the given string for use in XML text.
|
||||
func EscapeForXML(s string) string {
|
||||
result := bytes.NewBuffer(nil)
|
||||
xml.Escape(result, []byte(s))
|
||||
return result.String()
|
||||
}
|
Reference in New Issue
Block a user