refactor: pipe directly
This commit is contained in:
@@ -157,7 +157,6 @@ fn decrypt_js(encrypted_content: String) -> String {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn escape_js_string(s: String) -> String {
|
fn escape_js_string(s: String) -> String {
|
||||||
let escaped =
|
|
||||||
s
|
s
|
||||||
|> string.replace("\\", "\\\\")
|
|> string.replace("\\", "\\\\")
|
||||||
|> string.replace("'", "\\'")
|
|> string.replace("'", "\\'")
|
||||||
@@ -167,8 +166,6 @@ fn escape_js_string(s: String) -> String {
|
|||||||
|> string.replace("<", "\\u003c")
|
|> string.replace("<", "\\u003c")
|
||||||
|> string.replace(">", "\\u003e")
|
|> string.replace(">", "\\u003e")
|
||||||
|> string.replace("&", "\\u0026")
|
|> string.replace("&", "\\u0026")
|
||||||
|
|
||||||
escaped
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn crypto_js() -> String {
|
fn crypto_js() -> String {
|
||||||
|
|||||||
Reference in New Issue
Block a user