Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
PHP security. Now in Perl 6.
Perl6
branch: master

Merge pull request #1 from FROGGS/patch-1

add provides section for latest panda (S11 support)
latest commit 910d3b78a2
@xfix authored
Failed to load latest commit information.
lib/Acme Just in case convert $string to string.
logotype
t Add test with Cool
.gitattributes Just leave default text=auto case
LICENSE.md Use proper copyright symbol.
META.info add provides section for latest panda (S11 support)
README.md Update the address.

README.md

Acme::Addslashes - Perl 6 port of Perl 5 version of Acme::Addslashes which is "port" of PHP addslashes() function. Or something.

Synopsis

use Acme::Addslashes;

my $unsafe_string  = "Robert'); DROP TABLE Students;--";

my $totally_safe_string = addslashes($unsafe_string);

# $totally_safe_string now contains:
# R̸o̸b̸e̸r̸t̸'̸)̸;̸ ̸D̸R̸O̸P̸ ̸T̸A̸B̸L̸E̸ ̸S̸t̸u̸d̸e̸n̸t̸s̸;̸-̸-̸

# If that's not enough slashes to be safe, then I don't know what is

Functions

addslashes

The only function exported by this module. Will literally add slashes to anything. Letters, numbers, punctuation, whitespace, unicode symbols. You name it, this function can add a slash to it.

Author

Original function was written by James Aitken jaitken@cpan.org, this port was done by Konrad Borowski x.fix@o2.pl. Ok, it's not really a port as logic wasn't copied. But you can call it a port if you want.

Something went wrong with that request. Please try again.