on addslashes(s)
return (do shell script "sed 's/[\"\\\\'\\'']/\\\\&/g' <<<" & quoted form of s)
end addslashes
Last active
April 1, 2017 17:41
-
-
Save GreenFootballs/d487bce7fe30df9db9ff9b5c71031ab1 to your computer and use it in GitHub Desktop.
An Applescript subroutine that mimics PHP's addslashes() to escape single/double quotes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment