makedbsafe — try to make the returned string safe for use in the database
use Wacs;
scalar makedbsafe( | ...) ; |
parameter | description |
---|---|
string | the string of text to be considered |
allow | characters to allow which are not normally acceptable: at present
only forward slash (/ ) is recognised |
deny | characters to deny which are normal acceptable: at present any space character (space, tab, newline) given here will cause any whitespace characters to be stripped out. |
The makedbsafe
function is designed to remove
characters which are unsuitable for feeding to the database. It normally
works with a default set of rules, which implicitly disallows forward slash
(but this can be explicity allowed with allow=>'/'
).
Similarly white space can be removed from a file name when required using
the deny
option.