This website requires JavaScript.
Explore
Help
Sign In
161sh
/
iceshrimp-161sh
Watch
1
Star
0
Fork
0
You've already forked iceshrimp-161sh
mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced
2024-11-24 21:19:07 +01:00
Code
Issues
Packages
Projects
Releases
Wiki
Activity
12a974de13
iceshrimp-161sh
/
packages
/
backend
/
src
/
misc
/
sql-like-escape.ts
4 lines
83 B
TypeScript
Raw
Normal View
History
Unescape
Escape
(partially) cherry-picked from misskey/10e526b fix: Escape SQL LIKE * SQL LIKE escape * CHANGELOG
2023-01-08 12:32:17 +01:00
export
function
sqlLikeEscape
(
s
:
string
)
{
format
2023-05-07 02:46:07 +02:00
return
s
.
replace
(
/([%_])/g
,
"\\$1"
)
;
(partially) cherry-picked from misskey/10e526b fix: Escape SQL LIKE * SQL LIKE escape * CHANGELOG
2023-01-08 12:32:17 +01:00
}
Reference in New Issue
Copy Permalink