mirror of
https://gitea.phreedom.club/localhost_frssoft/bloat.git
synced 2024-11-21 20:29:20 +02:00
Fix replace syntax
This commit is contained in:
parent
67b13c71ba
commit
9b053e32ec
|
@ -1022,7 +1022,7 @@ func (s *service) SaveSettings(c *client, settings *model.Settings) (err error)
|
||||||
}
|
}
|
||||||
// For some reason, browsers convert CRLF to LF before calculating
|
// For some reason, browsers convert CRLF to LF before calculating
|
||||||
// the hash of the inline resources.
|
// the hash of the inline resources.
|
||||||
settings.CSS = strings.ReplaceAll(settings.CSS, "\x0d\x0a", "\x0a")
|
settings.CSS = strings.Replace(settings.CSS, "\x0d\x0a", "\x0a", -1)
|
||||||
|
|
||||||
h := sha256.Sum256([]byte(settings.CSS))
|
h := sha256.Sum256([]byte(settings.CSS))
|
||||||
settings.CSSHash = base64.StdEncoding.EncodeToString(h[:])
|
settings.CSSHash = base64.StdEncoding.EncodeToString(h[:])
|
||||||
|
|
Loading…
Reference in New Issue