Changeset View
Changeset View
Standalone View
Standalone View
src/xsprintf/hgsprintf.php
Context not available. | |||||
// If this is symbol only has "safe" alphanumeric latin characters, | // If this is symbol only has "safe" alphanumeric latin characters, | ||||
// and is at least one character long, we can let it through without | // and is at least one character long, we can let it through without | ||||
// escaping it. This tends to produce more readable commands. | // escaping it. This tends to produce more readable commands. | ||||
if (preg_match('(^[a-zA-Z0-9]+\z)', $value)) { | if (@preg_match('(^[a-zA-Z0-9]+\z)', $value)) { | ||||
$value = $value; | $value = $value; | ||||
} else { | } else { | ||||
$value = "'".addcslashes($value, "'\\")."'"; | $value = "'".addcslashes($value, "'\\")."'"; | ||||
Context not available. |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0