mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-04-28 20:06:36 +00:00
18 lines
291 B
Go
18 lines
291 B
Go
package utils
|
|
|
|
import (
|
|
"strconv"
|
|
"strings"
|
|
|
|
"github.com/rs/zerolog/log"
|
|
)
|
|
|
|
func UnescapeUnicodeCharacters(raw string) string {
|
|
str, err := strconv.Unquote(strings.Replace(strconv.Quote(raw), `\\u`, `\u`, -1))
|
|
if err != nil {
|
|
log.Error().Err(err).Send()
|
|
return raw
|
|
}
|
|
return str
|
|
}
|