/// Functions
-function s($var) {
+function s($var="") {
/// returns $var with HTML characters (like "<", ">", etc.) properly quoted,
return htmlSpecialChars(stripslashes_safe($var));
}
-function p($var) {
+function p($var="") {
/// prints $var with HTML characters (like "<", ">", etc.) properly quoted,
echo htmlSpecialChars(stripslashes_safe($var));
}
function detect_munged_arguments($string) {
- if (ereg("\.\.", $string)) { // check for parent URLs
+ if (ereg('\.\.', $string)) { // check for parent URLs
return true;
}
- if (ereg("\|", $string)) { // check for pipes
- return true;
- }
- if (ereg("\'", $string)) { // check for backquotes
+ if (ereg('[\|\`]', $string)) { // check for other bad characters
return true;
}
return false;