function myhtmlspecialchars($string, $flags = 'ENT_COMPAT | ENT_HTML401', $encoding = 'cp1251', $double_encode = true) {
return htmlspecialchars($string, $flags, $encoding, $double_encode);
}
find . -name '*.php' -print -exec sed -i 's/htmlspecialchars/myhtmlspecialchars/g' {} \;