+function html_specials_encode($str)
+{
+ return htmlspecialchars($str, ENT_QUOTES, $_SESSION['language']->encoding=='iso-8859-2' ? 'ISO-8859-1' : $_SESSION['language']->encoding);
+}
+
+function html_cleanup(&$parms)
+{
+ foreach($parms as $name => $value) {
+ if (is_array($value))
+ html_cleanup($parms[$name]);
+ else
+ $parms[$name] = html_specials_encode($value);
+ }
+ reset($parms); // needed for direct key() usage later throughout the sources
+}
+