refactor: pipe directly

This commit is contained in:
2026-03-02 07:36:16 +01:00
parent 26291f7d28
commit de72a9de4b

View File

@@ -157,18 +157,15 @@ fn decrypt_js(encrypted_content: String) -> String {
}
fn escape_js_string(s: String) -> String {
let escaped =
s
|> string.replace("\\", "\\\\")
|> string.replace("'", "\\'")
|> string.replace("\"", "\\\"")
|> string.replace("\n", "\\n")
|> string.replace("\r", "\\r")
|> string.replace("<", "\\u003c")
|> string.replace(">", "\\u003e")
|> string.replace("&", "\\u0026")
escaped
s
|> string.replace("\\", "\\\\")
|> string.replace("'", "\\'")
|> string.replace("\"", "\\\"")
|> string.replace("\n", "\\n")
|> string.replace("\r", "\\r")
|> string.replace("<", "\\u003c")
|> string.replace(">", "\\u003e")
|> string.replace("&", "\\u0026")
}
fn crypto_js() -> String {