<?php
/***************************************************************************
- * Copyright (C) 2003-2006 Polytechnique.org *
+ * Copyright (C) 2003-2007 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
);
global $globals;
- if (!$globals->debug) {
+ if (isset($globals) && !$globals->debug) {
if (strpos($errortype[$errno], 'Notice') !== false) {
return;
}
}
- $errstr = htmlentities($errstr);
+ $errstr = utf8_encode(htmlentities($errstr));
$GLOBALS['pl_errors'][] =
"<div class='phperror'>".
"<strong>{$errortype[$errno]}</strong> <em>$errstr</em><br />".
http_redirect($globals->baseurl . '/' . pl_url($path, $query, $fragment));
}
-// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+function pl_entities($text, $mode = ENT_COMPAT)
+{
+ return htmlentities($text, $mode, 'UTF-8');
+}
+
+function pl_entity_decode($text, $mode = ENT_COMPAT)
+{
+ return html_entity_decode($text, $mode, 'UTF-8');
+}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
?>