OSDN Git Service

CHANGE: ENTITYクラスの整備。globalfunctions.phpの整理。
authorsakamocchi <o-takashi@sakamocchi.jp>
Sun, 19 Feb 2012 10:37:48 +0000 (19:37 +0900)
committersakamocchi <o-takashi@sakamocchi.jp>
Sun, 19 Feb 2012 10:37:48 +0000 (19:37 +0900)
CHANGE: rearrangement for ENTITY class and globalfunctions.php.

XMLエンティティを扱うクラスとしてENTITYクラスを再整備。i18n::hsc()とi18n::hen()を移動。
これにより、globalfunctionsの以下の関数が非推奨となる。

highlight
shorten
stringStripTags
toAscii
stringToAttribute
stringToXML

加えて、formatDate()をi18n::formatted_datetime()に移動した。内容はまだ整備してない。

31 files changed:
createaccount.php
install/index.php
nucleus/bookmarklet.php
nucleus/convert/bloggercaif.php
nucleus/convert/functions.inc.php
nucleus/convert/greymatter.php
nucleus/convert/livejournal.php
nucleus/libs/ACTIONS.php
nucleus/libs/ADMIN.php
nucleus/libs/BLOG.php
nucleus/libs/BODYACTIONS.php
nucleus/libs/COMMENT.php
nucleus/libs/COMMENTACTIONS.php
nucleus/libs/ENCAPSULATE.php
nucleus/libs/ITEMACTIONS.php
nucleus/libs/MANAGER.php
nucleus/libs/PAGEFACTORY.php
nucleus/libs/PLUGINADMIN.php
nucleus/libs/entity.php [deleted file]
nucleus/libs/globalfunctions.php
nucleus/libs/i18n.php
nucleus/libs/showlist.php
nucleus/libs/skinie.php
nucleus/libs/sql/mysql.php
nucleus/libs/sql/pdo.php
nucleus/libs/xmlrpc.inc.php
nucleus/media.php
nucleus/plugins/NP_SecurityEnforcer.php
nucleus/plugins/securityenforcer/index.php
nucleus/plugins/skinfiles/index.php
xml-rss2.php

index 1fa06d3..f46ea12 100644 (file)
        
                Login Name (required): 
                <br />
-               <input name="name" size="32" maxlength="32" <?php if(isset($_POST['name'])){echo 'value="'.i18n::hsc($_POST['name']).'"';}?>/> <small>(only a-z, 0-9)</small>
+               <input name="name" size="32" maxlength="32" <?php if(isset($_POST['name'])){echo 'value="'.ENTITY::hsc($_POST['name']).'"';}?>/> <small>(only a-z, 0-9)</small>
                <br />
                <br />          
                Real Name (required): 
                <br />
-               <input name="realname" size="40" <?php if(isset($_POST['realname'])){echo 'value="'.i18n::hsc($_POST['realname']).'"';}?>/>
+               <input name="realname" size="40" <?php if(isset($_POST['realname'])){echo 'value="'.ENTITY::hsc($_POST['realname']).'"';}?>/>
                <br />
                <br />          
                Email (required):
                <br />
-               <input name="email" size="40" <?php if(isset($_POST['email'])){echo 'value="'.i18n::hsc($_POST['email']).'"';}?>/> <small>(must be valid, because an activation link will be sent over there)</small>
+               <input name="email" size="40" <?php if(isset($_POST['email'])){echo 'value="'.ENTITY::hsc($_POST['email']).'"';}?>/> <small>(must be valid, because an activation link will be sent over there)</small>
                <br />
                <br />          
                URL: 
                <br />
-               <input name="url" size="60" <?php if(isset($_POST['url'])){echo 'value="'.i18n::hsc($_POST['url']).'"';}?>/>
+               <input name="url" size="60" <?php if(isset($_POST['url'])){echo 'value="'.ENTITY::hsc($_POST['url']).'"';}?>/>
                <br />
                <?php
                // add extra fields from plugin, like NP_Profile
index f4060d5..f731db1 100644 (file)
@@ -273,7 +273,7 @@ function showInstallForm()
                        <table>
                                <tr>
                                        <td><label for="if_mySQL_host"><?php echo _TEXT4_TAB_FIELD1; ?>:</label></td>
-                                       <td><input id="if_mySQL_host" name="mySQL_host" value="<?php echo i18n::hsc(@ini_get('mysql.default_host') )?>" /></td>
+                                       <td><input id="if_mySQL_host" name="mySQL_host" value="<?php echo ENTITY::hsc(@ini_get('mysql.default_host') )?>" /></td>
                                </tr>
                                <tr>
                                        <td><label for="if_mySQL_user"><?php echo _TEXT4_TAB_FIELD2; ?>:</label></td>
@@ -736,7 +736,7 @@ function doInstall()
        for ( $idx = 0; $idx < $count; $idx++ )
        {
                $query = trim($queries[$idx]);
-               // echo "QUERY = <small>" . i18n::hsc($query) . "</small><p>";
+               // echo "QUERY = <small>" . ENTITY::hsc($query) . "</small><p>";
 
                if ( $query )
                {
@@ -746,14 +746,14 @@ function doInstall()
                                $query = str_replace($aTableNames, $aTableNamesPrefixed, $query);
                        } // end if
 
-                       sql_query($query, $MYSQL_CONN) or _doError(_ERROR30 . ' (<small>' . i18n::hsc($query) . '</small>): ' . sql_error($MYSQL_CONN) );
+                       sql_query($query, $MYSQL_CONN) or _doError(_ERROR30 . ' (<small>' . ENTITY::hsc($query) . '</small>): ' . sql_error($MYSQL_CONN) );
                } // end if
 
        } // end loop
 
        // 5a make first post
        $newpost = "INSERT INTO ". tableName('nucleus_item') ." VALUES (1, '" . _1ST_POST_TITLE . "', '" . _1ST_POST . "', '" . _1ST_POST2 . "', 1, 1, '2005-08-15 11:04:26', 0, 0, 0, 1, 0, 1);";
-       sql_query($newpost,$MYSQL_CONN) or _doError(_ERROR18 . ' (<small>' . i18n::hsc($newpost) . '</small>): ' . sql_error($MYSQL_CONN) );
+       sql_query($newpost,$MYSQL_CONN) or _doError(_ERROR18 . ' (<small>' . ENTITY::hsc($newpost) . '</small>): ' . sql_error($MYSQL_CONN) );
 
        // 6. update global settings
        updateConfig('IndexURL', $config_indexurl);
index f9251dd..15f4f91 100644 (file)
@@ -208,10 +208,10 @@ function bm_loginAndPassThrough() {
        <form method="post" action="bookmarklet.php">
        <p>
                <input name="action" value="login" type="hidden" />
-               <input name="blogid" value="<?php echo i18n::hsc($blogid); ?>" type="hidden" />
-               <input name="logtext" value="<?php echo i18n::hsc($log_text); ?>" type="hidden" />
-               <input name="loglink" value="<?php echo i18n::hsc($log_link); ?>" type="hidden" />
-               <input name="loglinktitle" value="<?php echo i18n::hsc($log_linktitle); ?>" type="hidden" />
+               <input name="blogid" value="<?php echo ENTITY::hsc($blogid); ?>" type="hidden" />
+               <input name="logtext" value="<?php echo ENTITY::hsc($log_text); ?>" type="hidden" />
+               <input name="loglink" value="<?php echo ENTITY::hsc($log_link); ?>" type="hidden" />
+               <input name="loglinktitle" value="<?php echo ENTITY::hsc($log_linktitle); ?>" type="hidden" />
                <?php echo _LOGINFORM_NAME ?>:
                <br /><input name="login" />
                <br /><?php echo _LOGINFORM_PWD ?>:
@@ -245,7 +245,7 @@ function bm_doShowForm() {
        $logje = '';
 
        if ($log_text) {
-               $logje .= '<blockquote><div>"' . i18n::hsc($log_text) . '"</div></blockquote>' . "\n";
+               $logje .= '<blockquote><div>"' . ENTITY::hsc($log_text) . '"</div></blockquote>' . "\n";
        }
 
        if (!$log_linktitle) {
@@ -253,11 +253,11 @@ function bm_doShowForm() {
        }
 
        if ($log_link) {
-               $logje .= '<a href="' . i18n::hsc($log_link) . '">' . i18n::hsc($log_linktitle) . '</a>';
+               $logje .= '<a href="' . ENTITY::hsc($log_link) . '">' . ENTITY::hsc($log_linktitle) . '</a>';
        }
 
        $item['body'] = $logje;
-       $item['title'] = i18n::hsc($log_linktitle);
+       $item['title'] = ENTITY::hsc($log_linktitle);
 
        $factory = new PAGEFACTORY($blogid);
        $factory->createAddForm('bookmarklet', $item);
index acdf280..a2301cd 100644 (file)
@@ -214,7 +214,7 @@ while ($a_name = array_pop($authors)) {
                <tr>
                        <td>
                                <b><?php echo $a_name?></b>
-                               <input name="author[<?php echo $idx?>]" value="<?php echo i18n::hsc($a_name)?>" type="hidden"
+                               <input name="author[<?php echo $idx?>]" value="<?php echo ENTITY::hsc($a_name)?>" type="hidden"
                        </td>
                        <td>
                <?php                   $query =  'SELECT mname as text, mnumber as value FROM '.sql_table('member');
@@ -392,7 +392,7 @@ function bc_convertOneItem($row, $memberid, $nucleus_blogid) {
 
        echo "<ul>";
        echo "<li>Blogger ID: $bloggerid </li>";
-       echo "<li>Body:" .  i18n::hsc(substr($row['body'],0,20)) . "...(time: " . $timestamp . ") </li>";
+       echo "<li>Body:" .  ENTITY::hsc(substr($row['body'],0,20)) . "...(time: " . $timestamp . ") </li>";
        echo "<li>author: " . $row['author'] ;
        echo " (nucleus-id: " . $nucl_id . ")</li>";
 
@@ -456,7 +456,7 @@ function bc_addComment($nucleus_itemid, $data) {
        else
                $c_userid = $c_email;
 
-       echo '<div>',i18n::hsc(shorten($c_text,50,'...')),'</div><ul>';
+       echo '<div>',ENTITY::hsc(shorten($c_text,50,'...')),'</div><ul>';
 //     echo '<li>Date: ',strftime('%x %X',$c_timestamp),'</li>';
        echo "<li>Name: $c_name</li>";
 //     echo "<li>Email: $c_email</li>";
index db3a01a..8bfc82e 100644 (file)
@@ -285,7 +285,7 @@ class BlogImport {
                        case 'NucleusMemberOptions':
                                $res = sql_query('SELECT mname as text, mnumber as value FROM '.sql_table('member'));
                                while ($o = mysql_fetch_object($res)) {
-                                       echo '<option value="'.i18n::hsc($o->value).'">'.i18n::hsc($o->text).'</option>';
+                                       echo '<option value="'.ENTITY::hsc($o->value).'">'.ENTITY::hsc($o->text).'</option>';
                                }
                                break;
 // ----------------------------------------------------------------------------------------
@@ -324,7 +324,7 @@ class BlogImport {
                                                <tr>
                                                        <td>
                                                                <strong><?php echo $a_name?></strong>
-                                                               <input name="author[<?php echo $idx?>]" value="<?php echo i18n::hsc($a_name)?>" type="hidden"
+                                                               <input name="author[<?php echo $idx?>]" value="<?php echo ENTITY::hsc($a_name)?>" type="hidden"
                                                        </td>
                                                        <td>
                                                                <select name="memberid[<?php echo $idx?>]">
@@ -382,7 +382,7 @@ class BlogImport {
                                                <tr>
                                                        <td>
                                                                <strong><?php echo $a_name?></strong>
-                                                               <input name="category[<?php echo $idx?>]" value="<?php echo i18n::hsc($a_name)?>" type="hidden"
+                                                               <input name="category[<?php echo $idx?>]" value="<?php echo ENTITY::hsc($a_name)?>" type="hidden"
                                                        </td>
                                                        <td>
                                                                <select name="catid[<?php echo $idx?>]">
@@ -705,7 +705,7 @@ class BlogImport {
         * Called by XML parser for data inside elements
         */
        function characterData ($parser, $data) {
-               if ($this->bDebug) echo 'NEW DATA: ', i18n::hsc($data), '<br />';
+               if ($this->bDebug) echo 'NEW DATA: ', ENTITY::hsc($data), '<br />';
                $this->cdata .= $data;
        }
 
index 5d09f65..c4529a2 100644 (file)
@@ -103,7 +103,7 @@ function gmc_askGreyPath() {
                </p>
 
                <ul>
-                       <li>GreyMatter path: <input name="grey_scriptpath" size="60" value="<?php echo i18n::hsc($guess)?>" /></li>
+                       <li>GreyMatter path: <input name="grey_scriptpath" size="60" value="<?php echo ENTITY::hsc($guess)?>" /></li>
                </ul>
 
                <p>
@@ -177,7 +177,7 @@ while ($author = fgets($filehandle,4096)) {
                <tr>
                        <td>
                                <b><?php echo $a_name?></b>
-                               <input name="author[<?php echo $idx?>]" value="<?php echo i18n::hsc($a_name)?>" type="hidden"
+                               <input name="author[<?php echo $idx?>]" value="<?php echo ENTITY::hsc($a_name)?>" type="hidden"
                        </td>
                        <td>
                <?php                   // TODO: avoid doing this query multiple times
@@ -252,9 +252,9 @@ fclose($filehandle);
                <h1>Do the conversion!</h1>
                <p>
                <input type="hidden" name="authorcount" value="<?php echo $idx?>" />
-               <input type="hidden" name="grey_scriptpath" value="<?php echo i18n::hsc($grey_scriptpath)?>" />
-               <input type="hidden" name="grey_datapath" value="<?php echo i18n::hsc($grey_datapath)?>" />
-               <input type="hidden" name="grey_dataurl" value="<?php echo i18n::hsc($grey_dataurl)?>" />
+               <input type="hidden" name="grey_scriptpath" value="<?php echo ENTITY::hsc($grey_scriptpath)?>" />
+               <input type="hidden" name="grey_datapath" value="<?php echo ENTITY::hsc($grey_datapath)?>" />
+               <input type="hidden" name="grey_dataurl" value="<?php echo ENTITY::hsc($grey_dataurl)?>" />
                <input type="submit" value="Do the conversion!" />
                <input type="hidden" name="action" value="doConversion" />
                </p>
@@ -534,7 +534,7 @@ function gm_popup($filename, $authorid, $text, $width, $height) {
        // TODO: copy file to media directory
        // TODO: create %popup(...)% code instead
 
-       $text = i18n::hsc(stripslashes($text));
+       $text = ENTITY::hsc(stripslashes($text));
 
        return "<%popup($filename|$width|$height|$text)%>";
 }
index 37724d6..f46788e 100644 (file)
@@ -327,7 +327,7 @@ function bc_convertOneItem($row, $memberid, $nucleus_blogid) {
        $timestamp = date("Y-m-d H:i:s",bc_transformDate($row['eventtime']));
 
        echo "<pre>";
-       echo "<b>entry</b>:" .  i18n::hsc(substr($row['event'],0,20)) . "...(time: " . $timestamp . ") \n";
+       echo "<b>entry</b>:" .  ENTITY::hsc(substr($row['event'],0,20)) . "...(time: " . $timestamp . ") \n";
        echo "<b>author</b>: " . $row['author'] ;
        echo " (nucleus-id: " . $nucl_id . ")";
        echo "</pre>";
index dcda7b2..4a57b0f 100644 (file)
@@ -260,10 +260,10 @@ class ACTIONS extends BaseActions {
         */
        function _link($url, $linktext = '')
        {
-               $u = i18n::hsc($url);
+               $u = ENTITY::hsc($url);
                $u = preg_replace("/&amp;amp;/",'&amp;',$u); // fix URLs that already had encoded ampersands
                if ($linktext != '') 
-                       $l = '<a href="' . $u .'">'.i18n::hsc($linktext).'</a>';
+                       $l = '<a href="' . $u .'">'.ENTITY::hsc($linktext).'</a>';
                else
                        $l = $u;
                return $l;
@@ -416,7 +416,7 @@ class ACTIONS extends BaseActions {
        function parse_additemform() {
                global $blog, $CONF;
                $this->formdata = array(
-                       'adminurl' => i18n::hsc($CONF['AdminURL']),
+                       'adminurl' => ENTITY::hsc($CONF['AdminURL']),
                        'catid' => $blog->getDefaultCategory()
                );
                $blog->InsertJavaScriptInfo();
@@ -577,19 +577,19 @@ class ACTIONS extends BaseActions {
                global $blog;
                switch($which) {
                        case 'id':
-                               echo i18n::hsc($blog->getID());
+                               echo ENTITY::hsc($blog->getID());
                                break;
                        case 'url':
-                               echo i18n::hsc($blog->getURL());
+                               echo ENTITY::hsc($blog->getURL());
                                break;
                        case 'name':
-                               echo i18n::hsc($blog->getName());
+                               echo ENTITY::hsc($blog->getName());
                                break;
                        case 'desc':
-                               echo i18n::hsc($blog->getDescription());
+                               echo ENTITY::hsc($blog->getDescription());
                                break;
                        case 'short':
-                               echo i18n::hsc($blog->getShortName());
+                               echo ENTITY::hsc($blog->getShortName());
                                break;
                }
        }
@@ -695,7 +695,7 @@ class ACTIONS extends BaseActions {
                        // note: createLink returns an HTML encoded URL
                } else {
                        // HTML encode URL
-                       $destinationurl = i18n::hsc($destinationurl);
+                       $destinationurl = ENTITY::hsc($destinationurl);
                }
 
                // values to prefill
@@ -711,12 +711,12 @@ class ACTIONS extends BaseActions {
 
                $this->formdata = array(
                        'destinationurl' => $destinationurl,    // url is already HTML encoded
-                       'actionurl' => i18n::hsc($actionurl),
+                       'actionurl' => ENTITY::hsc($actionurl),
                        'itemid' => $itemid,
-                       'user' => i18n::hsc($user),
-                       'userid' => i18n::hsc($userid),
-                       'email' => i18n::hsc($email),
-                       'body' => i18n::hsc($body),
+                       'user' => ENTITY::hsc($user),
+                       'userid' => ENTITY::hsc($userid),
+                       'email' => ENTITY::hsc($email),
+                       'body' => ENTITY::hsc($body),
                        'membername' => $member->getDisplayName(),
                        'rememberchecked' => cookieVar($CONF['CookiePrefix'] .'comment_user')?'checked="checked"':''
                );
@@ -755,7 +755,7 @@ class ACTIONS extends BaseActions {
        function parse_errordiv() {
                global $errormessage;
                if ($errormessage)
-                       echo '<div class="error">', i18n::hsc($errormessage),'</div>';
+                       echo '<div class="error">', ENTITY::hsc($errormessage),'</div>';
        }
        
        /**
@@ -794,11 +794,11 @@ class ACTIONS extends BaseActions {
        function parse_image($what = 'imgtag') {
                global $CONF;
 
-               $imagetext      = i18n::hsc(requestVar('imagetext'));
+               $imagetext      = ENTITY::hsc(requestVar('imagetext'));
                $imagepopup = requestVar('imagepopup');
                $width          = intRequestVar('width');
                $height         = intRequestVar('height');
-               $fullurl        = i18n::hsc($CONF['MediaURL'] . $imagepopup);
+               $fullurl        = ENTITY::hsc($CONF['MediaURL'] . $imagepopup);
 
                switch($what)
                {
@@ -826,7 +826,7 @@ class ACTIONS extends BaseActions {
         * Parse skinvar imagetext
         */
        function parse_imagetext() {
-               echo i18n::hsc(requestVar('imagetext'));
+               echo ENTITY::hsc(requestVar('imagetext'));
        }
 
        /**
@@ -877,7 +877,7 @@ class ACTIONS extends BaseActions {
                                echo $item['title'];
                                break;
                        default:
-                               echo i18n::hsc(strip_tags($item['title']));
+                               echo ENTITY::hsc(strip_tags($item['title']));
                                break;
                }
        }
@@ -911,22 +911,22 @@ class ACTIONS extends BaseActions {
 
                        switch($what) {
                                case 'name':
-                                       echo i18n::hsc($memberinfo->getDisplayName());
+                                       echo ENTITY::hsc($memberinfo->getDisplayName());
                                        break;
                                case 'realname':
-                                       echo i18n::hsc($memberinfo->getRealName());
+                                       echo ENTITY::hsc($memberinfo->getRealName());
                                        break;
                                case 'notes':
-                                       echo i18n::hsc($memberinfo->getNotes());
+                                       echo ENTITY::hsc($memberinfo->getNotes());
                                        break;
                                case 'url':
-                                       echo i18n::hsc($memberinfo->getURL());
+                                       echo ENTITY::hsc($memberinfo->getURL());
                                        break;
                                case 'email':
-                                       echo i18n::hsc($memberinfo->getEmail());
+                                       echo ENTITY::hsc($memberinfo->getEmail());
                                        break;
                                case 'id':
-                                       echo i18n::hsc($memberinfo->getID());
+                                       echo ENTITY::hsc($memberinfo->getID());
                                        break;
                        }
                }
@@ -981,13 +981,13 @@ class ACTIONS extends BaseActions {
                $frommail = postVar('frommail');
 
                $this->formdata = array(
-                       'url' => i18n::hsc($desturl),
-                       'actionurl' => i18n::hsc($CONF['ActionURL']),
+                       'url' => ENTITY::hsc($desturl),
+                       'actionurl' => ENTITY::hsc($CONF['ActionURL']),
                        'memberid' => $memberid,
                        'rows' => $rows,
                        'cols' => $cols,
-                       'message' => i18n::hsc($message),
-                       'frommail' => i18n::hsc($frommail)
+                       'message' => ENTITY::hsc($message),
+                       'frommail' => ENTITY::hsc($frommail)
                );
                if ($member->isLoggedIn()) {
                        $this->doForm('membermailform-loggedin');
@@ -1034,7 +1034,7 @@ class ACTIONS extends BaseActions {
                                echo $itemtitlenext;
                                break;
                        default:
-                               echo i18n::hsc($itemtitlenext);
+                               echo ENTITY::hsc($itemtitlenext);
                                break;
                }
        }
@@ -1235,7 +1235,7 @@ class ACTIONS extends BaseActions {
                                echo $itemtitleprev;
                                break;
                        default:
-                               echo i18n::hsc($itemtitleprev);
+                               echo ENTITY::hsc($itemtitleprev);
                                break;
                }
        }
@@ -1260,14 +1260,14 @@ class ACTIONS extends BaseActions {
         */
        function parse_query() {
                global $query;
-               echo i18n::hsc($query);
+               echo ENTITY::hsc($query);
        }
        
        /**
         * Parse skinvar referer
         */
        function parse_referer() {
-               echo i18n::hsc(serverVar('HTTP_REFERER'));
+               echo ENTITY::hsc(serverVar('HTTP_REFERER'));
        }
 
        /**
@@ -1283,7 +1283,7 @@ class ACTIONS extends BaseActions {
                // use default blog when no blog is selected
                $this->formdata = array(
                        'id' => $blog?$blog->getID():$CONF['DefaultBlog'],
-                       'query' => i18n::hsc(getVar('query')),
+                       'query' => ENTITY::hsc(getVar('query')),
                );
                $this->doForm('searchform');
        }
index 6d03b53..505b155 100644 (file)
@@ -131,7 +131,7 @@ class ADMIN
         if (method_exists($this, $methodName))
             call_user_func(array(&$this, $methodName));
         else
-            $this->error(_BADACTION . i18n::hsc(" ($action)"));
+            $this->error(_BADACTION . ENTITY::hsc(" ($action)"));
 
     }
 
@@ -158,7 +158,7 @@ class ADMIN
         $this->pagehead();
 
         echo '<h2>', _LOGIN ,'</h2>';
-        if ($msg) echo _MESSAGE , ': ', i18n::hsc($msg);
+        if ($msg) echo _MESSAGE , ': ', ENTITY::hsc($msg);
         ?>
 
         <form action="index.php" method="post"><p>
@@ -290,7 +290,7 @@ class ADMIN
      * @param object BLOG
      */
     function bloglink(&$blog) {
-        return '<a href="'.i18n::hsc($blog->getURL()).'" title="'._BLOGLIST_TT_VISIT.'">'. i18n::hsc( $blog->getName() ) .'</a>';
+        return '<a href="'.ENTITY::hsc($blog->getURL()).'" title="'._BLOGLIST_TT_VISIT.'">'. ENTITY::hsc( $blog->getName() ) .'</a>';
     }
 
     /**
@@ -429,14 +429,14 @@ class ADMIN
 
         echo '<a href="index.php?action=overview">(',_BACKHOME,')</a>';
         echo '<h2>',_BATCH_ITEMS,'</h2>';
-        echo '<p>',_BATCH_EXECUTING,' <b>',i18n::hsc($action),'</b></p>';
+        echo '<p>',_BATCH_EXECUTING,' <b>',ENTITY::hsc($action),'</b></p>';
         echo '<ul>';
 
 
         // walk over all itemids and perform action
         foreach ($selected as $itemid) {
             $itemid = intval($itemid);
-            echo '<li>',_BATCH_EXECUTING,' <b>',i18n::hsc($action),'</b> ',_BATCH_ONITEM,' <b>', $itemid, '</b>...';
+            echo '<li>',_BATCH_EXECUTING,' <b>',ENTITY::hsc($action),'</b> ',_BATCH_ONITEM,' <b>', $itemid, '</b>...';
 
             // perform action, display errors if needed
             switch($action) {
@@ -447,7 +447,7 @@ class ADMIN
                     $error = $this->moveOneItem($itemid, $destCatid);
                     break;
                 default:
-                    $error = _BATCH_UNKNOWN . i18n::hsc($action);
+                    $error = _BATCH_UNKNOWN . ENTITY::hsc($action);
             }
 
             echo '<b>',($error ? $error : _BATCH_SUCCESS),'</b>';
@@ -489,13 +489,13 @@ class ADMIN
 
         echo '<a href="index.php?action=overview">(',_BACKHOME,')</a>';
         echo '<h2>',_BATCH_COMMENTS,'</h2>';
-        echo '<p>',_BATCH_EXECUTING,' <b>',i18n::hsc($action),'</b></p>';
+        echo '<p>',_BATCH_EXECUTING,' <b>',ENTITY::hsc($action),'</b></p>';
         echo '<ul>';
 
         // walk over all itemids and perform action
         foreach ($selected as $commentid) {
             $commentid = intval($commentid);
-            echo '<li>',_BATCH_EXECUTING,' <b>',i18n::hsc($action),'</b> ',_BATCH_ONCOMMENT,' <b>', $commentid, '</b>...';
+            echo '<li>',_BATCH_EXECUTING,' <b>',ENTITY::hsc($action),'</b> ',_BATCH_ONCOMMENT,' <b>', $commentid, '</b>...';
 
             // perform action, display errors if needed
             switch($action) {
@@ -503,7 +503,7 @@ class ADMIN
                     $error = $this->deleteOneComment($commentid);
                     break;
                 default:
-                    $error = _BATCH_UNKNOWN . i18n::hsc($action);
+                    $error = _BATCH_UNKNOWN . ENTITY::hsc($action);
             }
 
             echo '<b>',($error ? $error : _BATCH_SUCCESS),'</b>';
@@ -543,13 +543,13 @@ class ADMIN
 
         echo '<a href="index.php?action=usermanagement">(',_MEMBERS_BACKTOOVERVIEW,')</a>';
         echo '<h2>',_BATCH_MEMBERS,'</h2>';
-        echo '<p>',_BATCH_EXECUTING,' <b>',i18n::hsc($action),'</b></p>';
+        echo '<p>',_BATCH_EXECUTING,' <b>',ENTITY::hsc($action),'</b></p>';
         echo '<ul>';
 
         // walk over all itemids and perform action
         foreach ($selected as $memberid) {
             $memberid = intval($memberid);
-            echo '<li>',_BATCH_EXECUTING,' <b>',i18n::hsc($action),'</b> ',_BATCH_ONMEMBER,' <b>', $memberid, '</b>...';
+            echo '<li>',_BATCH_EXECUTING,' <b>',ENTITY::hsc($action),'</b> ',_BATCH_ONMEMBER,' <b>', $memberid, '</b>...';
 
             // perform action, display errors if needed
             switch($action) {
@@ -570,7 +570,7 @@ class ADMIN
                         sql_query('UPDATE ' . sql_table('member') .' SET madmin=0 WHERE mnumber='.$memberid);
                     break;
                 default:
-                    $error = _BATCH_UNKNOWN . i18n::hsc($action);
+                    $error = _BATCH_UNKNOWN . ENTITY::hsc($action);
             }
 
             echo '<b>',($error ? $error : _BATCH_SUCCESS),'</b>';
@@ -613,13 +613,13 @@ class ADMIN
         echo '<p><a href="index.php?action=manageteam&amp;blogid=',$blogid,'">(',_BACK,')</a></p>';
 
         echo '<h2>',_BATCH_TEAM,'</h2>';
-        echo '<p>',_BATCH_EXECUTING,' <b>',i18n::hsc($action),'</b></p>';
+        echo '<p>',_BATCH_EXECUTING,' <b>',ENTITY::hsc($action),'</b></p>';
         echo '<ul>';
 
         // walk over all itemids and perform action
         foreach ($selected as $memberid) {
             $memberid = intval($memberid);
-            echo '<li>',_BATCH_EXECUTING,' <b>',i18n::hsc($action),'</b> ',_BATCH_ONTEAM,' <b>', $memberid, '</b>...';
+            echo '<li>',_BATCH_EXECUTING,' <b>',ENTITY::hsc($action),'</b> ',_BATCH_ONTEAM,' <b>', $memberid, '</b>...';
 
             // perform action, display errors if needed
             switch($action) {
@@ -640,7 +640,7 @@ class ADMIN
                         sql_query('UPDATE '.sql_table('team').' SET tadmin=0 WHERE tblog='.$blogid.' and tmember='.$memberid);
                     break;
                 default:
-                    $error = _BATCH_UNKNOWN . i18n::hsc($action);
+                    $error = _BATCH_UNKNOWN . ENTITY::hsc($action);
             }
 
             echo '<b>',($error ? $error : _BATCH_SUCCESS),'</b>';
@@ -687,13 +687,13 @@ class ADMIN
 
         echo '<a href="index.php?action=overview">(',_BACKHOME,')</a>';
         echo '<h2>',BATCH_CATEGORIES,'</h2>';
-        echo '<p>',_BATCH_EXECUTING,' <b>',i18n::hsc($action),'</b></p>';
+        echo '<p>',_BATCH_EXECUTING,' <b>',ENTITY::hsc($action),'</b></p>';
         echo '<ul>';
 
         // walk over all itemids and perform action
         foreach ($selected as $catid) {
             $catid = intval($catid);
-            echo '<li>',_BATCH_EXECUTING,' <b>',i18n::hsc($action),'</b> ',_BATCH_ONCATEGORY,' <b>', $catid, '</b>...';
+            echo '<li>',_BATCH_EXECUTING,' <b>',ENTITY::hsc($action),'</b> ',_BATCH_ONCATEGORY,' <b>', $catid, '</b>...';
 
             // perform action, display errors if needed
             switch($action) {
@@ -704,7 +704,7 @@ class ADMIN
                     $error = $this->moveOneCategory($catid, $destBlogId);
                     break;
                 default:
-                    $error = _BATCH_UNKNOWN . i18n::hsc($action);
+                    $error = _BATCH_UNKNOWN . ENTITY::hsc($action);
             }
 
             echo '<b>',($error ? _ERROR . ': '.$error : _BATCH_SUCCESS),'</b>';
@@ -875,7 +875,7 @@ class ADMIN
 
             while ($oBlog = sql_fetch_object($blogs)) {
                 if ($multipleBlogs)
-                    echo '<optgroup label="',i18n::hsc($oBlog->bname),'">';
+                    echo '<optgroup label="',ENTITY::hsc($oBlog->bname),'">';
 
                 // show selection to create new category when allowed/wanted
                 if ($showNewCat) {
@@ -891,7 +891,7 @@ class ADMIN
                         $selectText = ' selected="selected" ';
                     else
                         $selectText = '';
-                    echo '<option value="',$oCat->catid,'" ', $selectText,'>',i18n::hsc($oCat->cname),'</option>';
+                    echo '<option value="',$oCat->catid,'" ', $selectText,'>',ENTITY::hsc($oCat->cname),'</option>';
                 }
 
                 if ($multipleBlogs)
@@ -903,7 +903,7 @@ class ADMIN
                 echo '<option value="',$oBlog->bnumber,'"';
                 if ($oBlog->bnumber == $selected)
                     echo ' selected="selected"';
-                echo'>',i18n::hsc($oBlog->bname),'</option>';
+                echo'>',ENTITY::hsc($oBlog->bname),'</option>';
             }
         }
         echo '</select>';
@@ -1282,9 +1282,9 @@ class ADMIN
             $this->error(_ERROR_NOSUCHITEM);
 
         $item =& $manager->getItem($itemid,1,1);
-        $title = i18n::hsc(strip_tags($item['title']));
+        $title = ENTITY::hsc(strip_tags($item['title']));
         $body = strip_tags($item['body']);
-        $body = i18n::hsc(shorten($body,300,'...'));
+        $body = ENTITY::hsc(shorten($body,300,'...'));
 
         $this->pagehead();
         ?>
@@ -1632,7 +1632,7 @@ class ADMIN
         $comment = COMMENT::getComment($commentid);
 
         $body = strip_tags($comment['body']);
-        $body = i18n::hsc(shorten($body, 300, '...'));
+        $body = ENTITY::hsc(shorten($body, 300, '...'));
 
         if ($comment['member'])
             $author = $comment['member'];
@@ -1834,15 +1834,15 @@ class ADMIN
                        </td>
                        <td>
                        <?php if ($CONF['AllowLoginEdit'] || $member->isAdmin()) { ?>
-                               <input name="name" tabindex="10" maxlength="32" size="32" value="<?php echo  i18n::hsc($mem->getDisplayName()); ?>" />
+                               <input name="name" tabindex="10" maxlength="32" size="32" value="<?php echo  ENTITY::hsc($mem->getDisplayName()); ?>" />
                        <?php } else {
-                               echo i18n::hsc($member->getDisplayName());
+                               echo ENTITY::hsc($member->getDisplayName());
                           }
                        ?>
                        </td>
                </tr><tr>
                        <td><?php echo _MEMBERS_REALNAME?></td>
-                       <td><input name="realname" tabindex="20" maxlength="60" size="40" value="<?php echo  i18n::hsc($mem->getRealName()); ?>" /></td>
+                       <td><input name="realname" tabindex="20" maxlength="60" size="40" value="<?php echo  ENTITY::hsc($mem->getRealName()); ?>" /></td>
                </tr><tr>
                <?php if ($CONF['AllowLoginEdit'] || $member->isAdmin()) { ?>
                        <td><?php echo _MEMBERS_PWD?></td>
@@ -1855,10 +1855,10 @@ class ADMIN
                        <td><?php echo _MEMBERS_EMAIL?>
                                <br /><small><?php echo _MEMBERS_EMAIL_EDIT?></small>
                        </td>
-                       <td><input name="email" tabindex="40" size="40" maxlength="60" value="<?php echo  i18n::hsc($mem->getEmail()); ?>" /></td>
+                       <td><input name="email" tabindex="40" size="40" maxlength="60" value="<?php echo  ENTITY::hsc($mem->getEmail()); ?>" /></td>
                </tr><tr>
                        <td><?php echo _MEMBERS_URL?></td>
-                       <td><input name="url" tabindex="50" size="40" maxlength="100" value="<?php echo  i18n::hsc($mem->getURL()); ?>" /></td>
+                       <td><input name="url" tabindex="50" size="40" maxlength="100" value="<?php echo  ENTITY::hsc($mem->getURL()); ?>" /></td>
                <?php // only allow to change this by super-admins
                   // we don't want normal users to 'upgrade' themselves to super-admins, do we? ;-)
                   if ($member->isAdmin()) {
@@ -1872,7 +1872,7 @@ class ADMIN
                <?php } ?>
                </tr><tr>
                        <td><?php echo _MEMBERS_NOTES?></td>
-                       <td><input name="notes" tabindex="80" size="40" maxlength="100" value="<?php echo  i18n::hsc($mem->getNotes()); ?>" /></td>
+                       <td><input name="notes" tabindex="80" size="40" maxlength="100" value="<?php echo  ENTITY::hsc($mem->getNotes()); ?>" /></td>
                </tr><tr>
                        <td><?php echo _MEMBERS_DEFLANG?> <?php help('language'); ?>
                        </td>
@@ -1883,11 +1883,11 @@ class ADMIN
                                $locales = i18n::get_available_locale_list();
                                if ( !$mem->getLocale() || !in_array($mem->getLocale(), $locales) )
                                {
-                                       echo "<option value=\"\" selected=\"selected\">" . i18n::hsc(_MEMBERS_USESITELANG) . "</option>\n";
+                                       echo "<option value=\"\" selected=\"selected\">" . ENTITY::hsc(_MEMBERS_USESITELANG) . "</option>\n";
                                }
                                else
                                {
-                                       echo "<option value=\"\">" . i18n::hsc(_MEMBERS_USESITELANG) . "</option>\n";
+                                       echo "<option value=\"\">" . ENTITY::hsc(_MEMBERS_USESITELANG) . "</option>\n";
                                }
                                
                                foreach( $locales as $locale )
@@ -2153,7 +2153,7 @@ class ADMIN
         }
 
         $aVars = array(
-            'memberName' => i18n::hsc($mem->getDisplayName())
+            'memberName' => ENTITY::hsc($mem->getDisplayName())
         );
         $title = TEMPLATE::fill($title, $aVars);
         $text = TEMPLATE::fill($text, $aVars);
@@ -2175,7 +2175,7 @@ class ADMIN
 
                         <input type="hidden" name="action" value="activatesetpwd" />
                         <?php $manager->addTicketHidden() ?>
-                        <input type="hidden" name="key" value="<?php echo i18n::hsc($key) ?>" />
+                        <input type="hidden" name="key" value="<?php echo ENTITY::hsc($key) ?>" />
 
                         <table><tr>
                             <td><?php echo _MEMBERS_PWD?></td>
@@ -2371,7 +2371,7 @@ class ADMIN
         ?>
             <h2><?php echo _DELETE_CONFIRM?></h2>
 
-            <p><?php echo _CONFIRMTXT_TEAM1?><b><?php echo  i18n::hsc($teammem->getDisplayName()) ?></b><?php echo _CONFIRMTXT_TEAM2?><b><?php echo  i18n::hsc(strip_tags($blog->getName())) ?></b>
+            <p><?php echo _CONFIRMTXT_TEAM1?><b><?php echo  ENTITY::hsc($teammem->getDisplayName()) ?></b><?php echo _CONFIRMTXT_TEAM2?><b><?php echo  ENTITY::hsc(strip_tags($blog->getName())) ?></b>
             </p>
 
 
@@ -2502,7 +2502,7 @@ class ADMIN
             $res = sql_query('SELECT mname, mrealname FROM ' . sql_table('member') . ',' . sql_table('team') . ' WHERE mnumber=tmember AND tblog=' . intval($blogid));
             $aMemberNames = array();
             while ($o = sql_fetch_object($res))
-                array_push($aMemberNames, i18n::hsc($o->mname) . ' (' . i18n::hsc($o->mrealname). ')');
+                array_push($aMemberNames, ENTITY::hsc($o->mname) . ' (' . ENTITY::hsc($o->mrealname). ')');
             echo implode(',', $aMemberNames);
         ?>
         </p>
@@ -2522,18 +2522,18 @@ class ADMIN
         <input type="hidden" name="blogid" value="<?php echo  $blogid; ?>" />
         <table><tr>
             <td><?php echo _EBLOG_NAME?></td>
-            <td><input name="name" tabindex="10" size="40" maxlength="60" value="<?php echo  i18n::hsc($blog->getName()) ?>" /></td>
+            <td><input name="name" tabindex="10" size="40" maxlength="60" value="<?php echo  ENTITY::hsc($blog->getName()) ?>" /></td>
         </tr><tr>
             <td><?php echo _EBLOG_SHORTNAME?> <?php help('shortblogname'); ?>
                 <?php echo _EBLOG_SHORTNAME_EXTRA?>
             </td>
-            <td><input name="shortname" tabindex="20" maxlength="15" size="15" value="<?php echo  i18n::hsc($blog->getShortName()) ?>" /></td>
+            <td><input name="shortname" tabindex="20" maxlength="15" size="15" value="<?php echo  ENTITY::hsc($blog->getShortName()) ?>" /></td>
         </tr><tr>
             <td><?php echo _EBLOG_DESC?></td>
-            <td><input name="desc" tabindex="30" maxlength="200" size="40" value="<?php echo  i18n::hsc($blog->getDescription()) ?>" /></td>
+            <td><input name="desc" tabindex="30" maxlength="200" size="40" value="<?php echo  ENTITY::hsc($blog->getDescription()) ?>" /></td>
         </tr><tr>
             <td><?php echo _EBLOG_URL?></td>
-            <td><input name="url" tabindex="40" size="40" maxlength="100" value="<?php echo  i18n::hsc($blog->getURL()) ?>" /></td>
+            <td><input name="url" tabindex="40" size="40" maxlength="100" value="<?php echo  ENTITY::hsc($blog->getURL()) ?>" /></td>
         </tr><tr>
             <td><?php echo _EBLOG_DEFSKIN?>
                 <?php help('blogdefaultskin'); ?>
@@ -2571,7 +2571,7 @@ class ADMIN
          <td><?php $this->input_yesno('reqemail',$blog->emailRequired(),72); ?></td>
       </tr><tr>
             <td><?php echo _EBLOG_NOTIFY?> <?php help('blognotify'); ?></td>
-            <td><input name="notify" tabindex="80" maxlength="128" size="40" value="<?php echo  i18n::hsc($blog->getNotifyAddress()); ?>" /></td>
+            <td><input name="notify" tabindex="80" maxlength="128" size="40" value="<?php echo  ENTITY::hsc($blog->getNotifyAddress()); ?>" /></td>
         </tr><tr>
             <td><?php echo _EBLOG_NOTIFY_ON?></td>
             <td>
@@ -2589,10 +2589,10 @@ class ADMIN
             </td>
         </tr><tr>
             <td><?php echo _EBLOG_MAXCOMMENTS?> <?php help('blogmaxcomments'); ?></td>
-            <td><input name="maxcomments" tabindex="90" size="3" value="<?php echo  i18n::hsc($blog->getMaxComments()); ?>" /></td>
+            <td><input name="maxcomments" tabindex="90" size="3" value="<?php echo  ENTITY::hsc($blog->getMaxComments()); ?>" /></td>
         </tr><tr>
             <td><?php echo _EBLOG_UPDATE?> <?php help('blogupdatefile'); ?></td>
-            <td><input name="update" tabindex="100" size="40" maxlength="60" value="<?php echo  i18n::hsc($blog->getUpdateFile()) ?>" /></td>
+            <td><input name="update" tabindex="100" size="40" maxlength="60" value="<?php echo  ENTITY::hsc($blog->getUpdateFile()) ?>" /></td>
         </tr><tr>
             <td><?php echo _EBLOG_DEFCAT?></td>
             <td>
@@ -2611,7 +2611,7 @@ class ADMIN
                 <br /><?php echo _EBLOG_STIME?> <b><?php echo  i18n::strftime("%H:%M",time()); ?></b>
                 <br /><?php echo _EBLOG_BTIME?> <b><?php echo  i18n::strftime("%H:%M",$blog->getCorrectTime()); ?></b>
                 </td>
-            <td><input name="timeoffset" tabindex="120" size="3" value="<?php echo  i18n::hsc($blog->getTimeOffset()); ?>" /></td>
+            <td><input name="timeoffset" tabindex="120" size="3" value="<?php echo  ENTITY::hsc($blog->getTimeOffset()); ?>" /></td>
         </tr><tr>
             <td><?php echo _EBLOG_SEARCH?> <?php help('blogsearchable'); ?></td>
             <td><?php $this->input_yesno('searchable',$blog->getSearchable(),122); ?></td>
@@ -2734,11 +2734,11 @@ class ADMIN
         echo "<p><a href='index.php?action=blogsettings&amp;blogid=$blogid'>(",_BACK_TO_BLOGSETTINGS,")</a></p>";
 
         ?>
-        <h2><?php echo _EBLOG_CAT_UPDATE?> '<?php echo i18n::hsc($cname)?>'</h2>
+        <h2><?php echo _EBLOG_CAT_UPDATE?> '<?php echo ENTITY::hsc($cname)?>'</h2>
         <form method='post' action='index.php'><div>
         <input name="blogid" type="hidden" value="<?php echo $blogid?>" />
         <input name="catid" type="hidden" value="<?php echo $catid?>" />
-        <input name="desturl" type="hidden" value="<?php echo i18n::hsc($desturl) ?>" />
+        <input name="desturl" type="hidden" value="<?php echo ENTITY::hsc($desturl) ?>" />
         <input name="action" type="hidden" value="categoryupdate" />
         <?php $manager->addTicketHidden(); ?>
 
@@ -2746,10 +2746,10 @@ class ADMIN
             <th colspan="2"><?php echo _EBLOG_CAT_UPDATE ?></th>
         </tr><tr>
             <td><?php echo _EBLOG_CAT_NAME?></td>
-            <td><input type="text" name="cname" value="<?php echo i18n::hsc($cname)?>" size="40" maxlength="40" /></td>
+            <td><input type="text" name="cname" value="<?php echo ENTITY::hsc($cname)?>" size="40" maxlength="40" /></td>
         </tr><tr>
             <td><?php echo _EBLOG_CAT_DESC?></td>
-            <td><input type="text" name="cdesc" value="<?php echo i18n::hsc($cdesc)?>" size="40" maxlength="200" /></td>
+            <td><input type="text" name="cdesc" value="<?php echo ENTITY::hsc($cdesc)?>" size="40" maxlength="200" /></td>
         </tr>
         <?php
             // insert plugin options
@@ -2843,7 +2843,7 @@ class ADMIN
             <h2><?php echo _DELETE_CONFIRM?></h2>
 
             <div>
-            <?php echo _CONFIRMTXT_CATEGORY?><b><?php echo  i18n::hsc($blog->getCategoryName($catid))?></b>
+            <?php echo _CONFIRMTXT_CATEGORY?><b><?php echo  ENTITY::hsc($blog->getCategoryName($catid))?></b>
             </div>
 
             <form method="post" action="index.php"><div>
@@ -3103,7 +3103,7 @@ class ADMIN
             </p>
 
             <div>
-            <?php echo _CONFIRMTXT_BLOG?><b><?php echo  i18n::hsc($blog->getName())?></b>
+            <?php echo _CONFIRMTXT_BLOG?><b><?php echo  ENTITY::hsc($blog->getName())?></b>
             </div>
 
             <form method="post" action="index.php"><div>
@@ -3180,7 +3180,7 @@ class ADMIN
         ?>
             <h2><?php echo _DELETE_CONFIRM?></h2>
 
-            <p><?php echo _CONFIRMTXT_MEMBER?><b><?php echo i18n::hsc($mem->getDisplayName()) ?></b>
+            <p><?php echo _CONFIRMTXT_MEMBER?><b><?php echo ENTITY::hsc($mem->getDisplayName()) ?></b>
             </p>
 
             <p>
@@ -3433,23 +3433,23 @@ class ADMIN
         ?>
         <h2><?php echo _BLOGCREATED_TITLE ?></h2>
 
-        <p><?php echo sprintf(_BLOGCREATED_ADDEDTXT, i18n::hsc($bname)) ?></p>
+        <p><?php echo sprintf(_BLOGCREATED_ADDEDTXT, ENTITY::hsc($bname)) ?></p>
 
         <ol>
-            <li><a href="#index_php"><?php echo sprintf(_BLOGCREATED_SIMPLEWAY, i18n::hsc($bshortname)) ?></a></li>
+            <li><a href="#index_php"><?php echo sprintf(_BLOGCREATED_SIMPLEWAY, ENTITY::hsc($bshortname)) ?></a></li>
             <li><a href="#skins"><?php echo _BLOGCREATED_ADVANCEDWAY ?></a></li>
         </ol>
 
-        <h3><a id="index_php"><?php echo sprintf(_BLOGCREATED_SIMPLEDESC1, i18n::hsc($bshortname)) ?></a></h3>
+        <h3><a id="index_php"><?php echo sprintf(_BLOGCREATED_SIMPLEDESC1, ENTITY::hsc($bshortname)) ?></a></h3>
 
-        <p><?php echo sprintf(_BLOGCREATED_SIMPLEDESC2, i18n::hsc($bshortname)) ?></p>
+        <p><?php echo sprintf(_BLOGCREATED_SIMPLEDESC2, ENTITY::hsc($bshortname)) ?></p>
 <pre><code>&lt;?php
 
-$CONF['Self'] = '<b><?php echo i18n::hsc($bshortname)?>.php</b>';
+$CONF['Self'] = '<b><?php echo ENTITY::hsc($bshortname)?>.php</b>';
 
 include('<i>./config.php</i>');
 
-selectBlog('<b><?php echo i18n::hsc($bshortname)?></b>');
+selectBlog('<b><?php echo ENTITY::hsc($bshortname)?></b>');
 selector();
 
 ?&gt;</code></pre>
@@ -3464,7 +3464,7 @@ selector();
             <input type="hidden" name="blogid" value="<?php echo intval($blogid)?>" />
             <table><tr>
                 <td><?php echo _EBLOG_URL?></td>
-                <td><input name="url" maxlength="100" size="40" value="<?php echo i18n::hsc($CONF['IndexURL'].$bshortname.'.php')?>" /></td>
+                <td><input name="url" maxlength="100" size="40" value="<?php echo ENTITY::hsc($CONF['IndexURL'].$bshortname.'.php')?>" /></td>
             </tr><tr>
                 <td><?php echo _EBLOG_CREATE?></td>
                 <td><input type="submit" value="<?php echo _EBLOG_CREATE_BTN?>" onclick="return checkSubmit();" /></td>
@@ -3541,7 +3541,7 @@ selector();
                                 <input type="hidden" name="mode" value="file" />
                                 <select name="skinfile" id="skinie_import_local">
                                 <?php                                   foreach ($candidates as $skinname => $skinfile) {
-                                        $html = i18n::hsc($skinfile);
+                                        $html = ENTITY::hsc($skinfile);
                                         echo '<option value="',$html,'">',$skinname,'</option>';
                                     }
                                 ?>
@@ -3581,8 +3581,8 @@ selector();
         while ($skinObj = sql_fetch_object($res)) {
             $id = 'skinexp' . $skinObj->sdnumber;
             echo '<td><input type="checkbox" name="skin[',$skinObj->sdnumber,']"  id="',$id,'" />';
-            echo '<label for="',$id,'">',i18n::hsc($skinObj->sdname),'</label></td>';
-            echo '<td>',i18n::hsc($skinObj->sddesc),'</td>';
+            echo '<label for="',$id,'">',ENTITY::hsc($skinObj->sdname),'</label></td>';
+            echo '<td>',ENTITY::hsc($skinObj->sddesc),'</td>';
             echo '</tr><tr>';
         }
 
@@ -3593,8 +3593,8 @@ selector();
         while ($templateObj = sql_fetch_object($res)) {
             $id = 'templateexp' . $templateObj->tdnumber;
             echo '<td><input type="checkbox" name="template[',$templateObj->tdnumber,']" id="',$id,'" />';
-            echo '<label for="',$id,'">',i18n::hsc($templateObj->tdname),'</label></td>';
-            echo '<td>',i18n::hsc($templateObj->tddesc),'</td>';
+            echo '<label for="',$id,'">',ENTITY::hsc($templateObj->tdname),'</label></td>';
+            echo '<td>',ENTITY::hsc($templateObj->tddesc),'</td>';
             echo '</tr><tr>';
         }
 
@@ -3659,7 +3659,7 @@ selector();
         <h2><?php echo _SKINIE_CONFIRM_TITLE?></h2>
 
         <ul>
-            <li><p><strong><?php echo _SKINIE_INFO_GENERAL?></strong> <?php echo i18n::hsc($importer->getInfo())?></p></li>
+            <li><p><strong><?php echo _SKINIE_INFO_GENERAL?></strong> <?php echo ENTITY::hsc($importer->getInfo())?></p></li>
             <li><p><strong><?php echo _SKINIE_INFO_SKINS?></strong> <?php echo implode(' <em>'._AND.'</em> ',$importer->getSkinNames())?></p></li>
             <li><p><strong><?php echo _SKINIE_INFO_TEMPLATES?></strong> <?php echo implode(' <em>'._AND.'</em> ',$importer->getTemplateNames())?></p></li>
             <?php
@@ -3676,8 +3676,8 @@ selector();
         <form method="post" action="index.php"><div>
             <input type="hidden" name="action" value="skiniedoimport" />
             <?php $manager->addTicketHidden() ?>
-            <input type="hidden" name="skinfile" value="<?php echo i18n::hsc(postVar('skinfile'))?>" />
-            <input type="hidden" name="mode" value="<?php echo i18n::hsc($mode)?>" />
+            <input type="hidden" name="skinfile" value="<?php echo ENTITY::hsc(postVar('skinfile'))?>" />
+            <input type="hidden" name="mode" value="<?php echo ENTITY::hsc($mode)?>" />
             <input type="submit" value="<?php echo _SKINIE_CONFIRM_IMPORT?>" />
             <?php
                 if ($hasNameClashes)
@@ -3743,7 +3743,7 @@ selector();
         <h2><?php echo _SKINIE_DONE?></h2>
 
         <ul>
-            <li><p><strong><?php echo _SKINIE_INFO_GENERAL?></strong> <?php echo i18n::hsc($importer->getInfo())?></p></li>
+            <li><p><strong><?php echo _SKINIE_INFO_GENERAL?></strong> <?php echo ENTITY::hsc($importer->getInfo())?></p></li>
             <li><p><strong><?php echo _SKINIE_INFO_IMPORTEDSKINS?></strong> <?php echo implode(' <em>'._AND.'</em> ',$importer->getSkinNames())?></p></li>
             <li><p><strong><?php echo _SKINIE_INFO_IMPORTEDTEMPLS?></strong> <?php echo implode(' <em>'._AND.'</em> ',$importer->getTemplateNames())?></p></li>
         </ul>
@@ -3854,7 +3854,7 @@ selector();
         <a href="index.php?action=templateoverview">(<?php echo _TEMPLATE_BACK?>)</a>
         </p>
 
-        <h2><?php echo _TEMPLATE_EDIT_TITLE?> '<?php echo  i18n::hsc($templatename); ?>'</h2>
+        <h2><?php echo _TEMPLATE_EDIT_TITLE?> '<?php echo  ENTITY::hsc($templatename); ?>'</h2>
 
         <?php                   if ($msg) echo "<p>"._MESSAGE.": $msg</p>";
         ?>
@@ -3872,10 +3872,10 @@ selector();
             <th colspan="2"><?php echo _TEMPLATE_SETTINGS?></th>
         </tr><tr>
             <td><?php echo _TEMPLATE_NAME?> <?php help('shortnames');?></td>
-            <td><input name="tname" tabindex="4" size="20" maxlength="20" value="<?php echo  i18n::hsc($templatename) ?>" /></td>
+            <td><input name="tname" tabindex="4" size="20" maxlength="20" value="<?php echo  ENTITY::hsc($templatename) ?>" /></td>
         </tr><tr>
             <td><?php echo _TEMPLATE_DESC?></td>
-            <td><input name="tdesc" tabindex="5" size="50" maxlength="200" value="<?php echo  i18n::hsc($templatedescription) ?>" /></td>
+            <td><input name="tdesc" tabindex="5" size="50" maxlength="200" value="<?php echo  ENTITY::hsc($templatedescription) ?>" /></td>
         </tr><tr>
             <th colspan="2"><?php echo _TEMPLATE_UPDATE?></th>
         </tr><tr>
@@ -3958,7 +3958,7 @@ selector();
 
         foreach ($pluginfields as $pfkey=>$pfvalue) {
             echo "</tr><tr>\n";
-            echo '<th colspan="2">' . i18n::hen($pfkey) . "</th>\n";
+            echo '<th colspan="2">' . ENTITY::hen($pfkey) . "</th>\n";
             foreach ($pfvalue as $pffield=>$pfdesc) {
                 $this->_templateEditRow($template, $pfdesc, $pffield, '',++$tab,0);
             }
@@ -3989,7 +3989,7 @@ selector();
     ?>
         </tr><tr>
             <td><?php echo $description?> <?php if ($help) help('template'.$help); ?></td>
-            <td id="td<?php echo $count?>"><textarea class="templateedit" name="<?php echo $name?>" tabindex="<?php echo $tabindex?>" cols="50" rows="<?php echo $big?10:5?>" id="textarea<?php echo $count?>"><?php echo  i18n::hsc($template[$name]); ?></textarea></td>
+            <td id="td<?php echo $count?>"><textarea class="templateedit" name="<?php echo $name?>" tabindex="<?php echo $tabindex?>" cols="50" rows="<?php echo $big?10:5?>" id="textarea<?php echo $count?>"><?php echo  ENTITY::hsc($template[$name]); ?></textarea></td>
     <?php       $count++;
     }
 
@@ -4114,7 +4114,7 @@ selector();
             <h2><?php echo _DELETE_CONFIRM?></h2>
 
             <p>
-            <?php echo _CONFIRMTXT_TEMPLATE?><b><?php echo i18n::hsc($name)?></b> (<?php echo  i18n::hsc($desc) ?>)
+            <?php echo _CONFIRMTXT_TEMPLATE?><b><?php echo ENTITY::hsc($name)?></b> (<?php echo  ENTITY::hsc($desc) ?>)
             </p>
 
             <form method="post" action="index.php"><div>
@@ -4328,7 +4328,7 @@ selector();
             $tabstart = 75;
 
             while ($row = sql_fetch_assoc($res)) {
-                echo '<li><a tabindex="' . ($tabstart++) . '" href="index.php?action=skinedittype&amp;skinid=' . $skinid . '&amp;type=' . i18n::hsc(strtolower($row['stype'])) . '">' . i18n::hsc(ucfirst($row['stype'])) . '</a> (<a tabindex="' . ($tabstart++) . '" href="index.php?action=skinremovetype&amp;skinid=' . $skinid . '&amp;type=' . i18n::hsc(strtolower($row['stype'])) . '">remove</a>)</li>';
+                echo '<li><a tabindex="' . ($tabstart++) . '" href="index.php?action=skinedittype&amp;skinid=' . $skinid . '&amp;type=' . ENTITY::hsc(strtolower($row['stype'])) . '">' . ENTITY::hsc(ucfirst($row['stype'])) . '</a> (<a tabindex="' . ($tabstart++) . '" href="index.php?action=skinremovetype&amp;skinid=' . $skinid . '&amp;type=' . ENTITY::hsc(strtolower($row['stype'])) . '">remove</a>)</li>';
             }
 
             echo '</ul>';
@@ -4345,19 +4345,19 @@ selector();
         <input type="hidden" name="skinid" value="<?php echo  $skinid ?>" />
         <table><tr>
             <td><?php echo _SKIN_NAME?> <?php help('shortnames');?></td>
-            <td><input name="name" tabindex="90" value="<?php echo  i18n::hsc($skin->getName()) ?>" maxlength="20" size="20" /></td>
+            <td><input name="name" tabindex="90" value="<?php echo  ENTITY::hsc($skin->getName()) ?>" maxlength="20" size="20" /></td>
         </tr><tr>
             <td><?php echo _SKIN_DESC?></td>
-            <td><input name="desc" tabindex="100" value="<?php echo  i18n::hsc($skin->getDescription()) ?>" maxlength="200" size="50" /></td>
+            <td><input name="desc" tabindex="100" value="<?php echo  ENTITY::hsc($skin->getDescription()) ?>" maxlength="200" size="50" /></td>
         </tr><tr>
             <td><?php echo _SKIN_TYPE?></td>
-            <td><input name="type" tabindex="110" value="<?php echo  i18n::hsc($skin->getContentType()) ?>" maxlength="40" size="20" /></td>
+            <td><input name="type" tabindex="110" value="<?php echo  ENTITY::hsc($skin->getContentType()) ?>" maxlength="40" size="20" /></td>
         </tr><tr>
             <td><?php echo _SKIN_INCLUDE_MODE?> <?php help('includemode')?></td>
             <td><?php $this->input_yesno('inc_mode',$skin->getIncludeMode(),120,'skindir','normal',_PARSER_INCMODE_SKINDIR,_PARSER_INCMODE_NORMAL);?></td>
         </tr><tr>
             <td><?php echo _SKIN_INCLUDE_PREFIX?> <?php help('includeprefix')?></td>
-            <td><input name="inc_prefix" tabindex="130" value="<?php echo  i18n::hsc($skin->getIncludePrefix()) ?>" maxlength="40" size="20" /></td>
+            <td><input name="inc_prefix" tabindex="130" value="<?php echo  ENTITY::hsc($skin->getIncludePrefix()) ?>" maxlength="40" size="20" /></td>
         </tr><tr>
             <td><?php echo _SKIN_CHANGE?></td>
             <td><input type="submit" tabindex="140" value="<?php echo _SKIN_CHANGE_BTN?>" onclick="return checkSubmit();" /></td>
@@ -4431,7 +4431,7 @@ selector();
         ?>
         <p>(<a href="index.php?action=skinoverview"><?php echo _SKIN_GOBACK?></a>)</p>
 
-        <h2><?php echo _SKIN_EDITPART_TITLE?> '<?php echo i18n::hsc($skin->getName()) ?>': <?php echo i18n::hsc(isset($friendlyNames[$type]) ? $friendlyNames[$type] : ucfirst($type)); ?></h2>
+        <h2><?php echo _SKIN_EDITPART_TITLE?> '<?php echo ENTITY::hsc($skin->getName()) ?>': <?php echo ENTITY::hsc(isset($friendlyNames[$type]) ? $friendlyNames[$type] : ucfirst($type)); ?></h2>
 
         <?php           if ($msg) echo "<p>"._MESSAGE.": $msg</p>";
         ?>
@@ -4447,7 +4447,7 @@ selector();
 
         <input type="submit" value="<?php echo _SKIN_UPDATE_BTN?>" onclick="return checkSubmit();" />
         <input type="reset" value="<?php echo _SKIN_RESET_BTN?>" />
-        (skin type: <?php echo i18n::hsc(isset($friendlyNames[$type]) ? $friendlyNames[$type] : ucfirst($type)); ?>)
+        (skin type: <?php echo ENTITY::hsc(isset($friendlyNames[$type]) ? $friendlyNames[$type] : ucfirst($type)); ?>)
         <?php if (in_array($type, array('index', 'item', 'archivelist', 'archive', 'search', 'error', 'member', 'imagepopup'))) {
             help('skinpart' . $type);
         } else {
@@ -4455,12 +4455,12 @@ selector();
         }?>
         <br />
 
-        <textarea class="skinedit" tabindex="10" rows="20" cols="80" name="content"><?php echo  i18n::hsc($skin->getContent($type)) ?></textarea>
+        <textarea class="skinedit" tabindex="10" rows="20" cols="80" name="content"><?php echo  ENTITY::hsc($skin->getContent($type)) ?></textarea>
 
         <br />
         <input type="submit" tabindex="20" value="<?php echo _SKIN_UPDATE_BTN?>" onclick="return checkSubmit();" />
         <input type="reset" value="<?php echo _SKIN_RESET_BTN?>" />
-        (skin type: <?php echo i18n::hsc(isset($friendlyNames[$type]) ? $friendlyNames[$type] : ucfirst($type)); ?>)
+        (skin type: <?php echo ENTITY::hsc(isset($friendlyNames[$type]) ? $friendlyNames[$type] : ucfirst($type)); ?>)
 
         <br /><br />
         <?php echo _SKIN_ALLOWEDVARS?>
@@ -4523,7 +4523,7 @@ selector();
         $query = 'SELECT bname FROM '.sql_table('blog').' WHERE bdefskin=' . $skinid;
         $r = sql_query($query);
         if ($o = sql_fetch_object($r))
-            $this->error(_ERROR_SKINDEFDELETE . i18n::hsc($o->bname));
+            $this->error(_ERROR_SKINDEFDELETE . ENTITY::hsc($o->bname));
 
         $this->pagehead();
 
@@ -4535,7 +4535,7 @@ selector();
             <h2><?php echo _DELETE_CONFIRM?></h2>
 
             <p>
-                <?php echo _CONFIRMTXT_SKIN?><b><?php echo i18n::hsc($name) ?></b> (<?php echo  i18n::hsc($desc)?>)
+                <?php echo _CONFIRMTXT_SKIN?><b><?php echo ENTITY::hsc($name) ?></b> (<?php echo  ENTITY::hsc($desc)?>)
             </p>
 
             <form method="post" action="index.php"><div>
@@ -4611,14 +4611,14 @@ selector();
             <h2><?php echo _DELETE_CONFIRM?></h2>
 
             <p>
-                <?php echo _CONFIRMTXT_SKIN_PARTS_SPECIAL; ?> <b><?php echo i18n::hsc($skintype); ?> (<?php echo i18n::hsc($name); ?>)</b> (<?php echo  i18n::hsc($desc)?>)
+                <?php echo _CONFIRMTXT_SKIN_PARTS_SPECIAL; ?> <b><?php echo ENTITY::hsc($skintype); ?> (<?php echo ENTITY::hsc($name); ?>)</b> (<?php echo  ENTITY::hsc($desc)?>)
             </p>
 
             <form method="post" action="index.php"><div>
                 <input type="hidden" name="action" value="skinremovetypeconfirm" />
                 <?php $manager->addTicketHidden() ?>
                 <input type="hidden" name="skinid" value="<?php echo $skinid; ?>" />
-                <input type="hidden" name="type" value="<?php echo i18n::hsc($skintype); ?>" />
+                <input type="hidden" name="type" value="<?php echo ENTITY::hsc($skintype); ?>" />
                 <input type="submit" tabindex="10" value="<?php echo _DELETE_CONFIRM_BTN?>" />
             </div></form>
         <?php
@@ -4771,25 +4771,25 @@ selector();
             </td>
         </tr><tr>
             <td><?php echo _SETTINGS_ADMINMAIL?></td>
-            <td><input name="AdminEmail" tabindex="10010" size="40" value="<?php echo  i18n::hsc($CONF['AdminEmail']) ?>" /></td>
+            <td><input name="AdminEmail" tabindex="10010" size="40" value="<?php echo  ENTITY::hsc($CONF['AdminEmail']) ?>" /></td>
         </tr><tr>
             <td><?php echo _SETTINGS_SITENAME?></td>
-            <td><input name="SiteName" tabindex="10020" size="40" value="<?php echo  i18n::hsc($CONF['SiteName']) ?>" /></td>
+            <td><input name="SiteName" tabindex="10020" size="40" value="<?php echo  ENTITY::hsc($CONF['SiteName']) ?>" /></td>
         </tr><tr>
             <td><?php echo _SETTINGS_SITEURL?></td>
-            <td><input name="IndexURL" tabindex="10030" size="40" value="<?php echo  i18n::hsc($CONF['IndexURL']) ?>" /></td>
+            <td><input name="IndexURL" tabindex="10030" size="40" value="<?php echo  ENTITY::hsc($CONF['IndexURL']) ?>" /></td>
         </tr><tr>
             <td><?php echo _SETTINGS_ADMINURL?></td>
-            <td><input name="AdminURL" tabindex="10040" size="40" value="<?php echo  i18n::hsc($CONF['AdminURL']) ?>" /></td>
+            <td><input name="AdminURL" tabindex="10040" size="40" value="<?php echo  ENTITY::hsc($CONF['AdminURL']) ?>" /></td>
         </tr><tr>
             <td><?php echo _SETTINGS_PLUGINURL?> <?php help('pluginurl');?></td>
-            <td><input name="PluginURL" tabindex="10045" size="40" value="<?php echo  i18n::hsc($CONF['PluginURL']) ?>" /></td>
+            <td><input name="PluginURL" tabindex="10045" size="40" value="<?php echo  ENTITY::hsc($CONF['PluginURL']) ?>" /></td>
         </tr><tr>
             <td><?php echo _SETTINGS_SKINSURL?> <?php help('skinsurl');?></td>
-            <td><input name="SkinsURL" tabindex="10046" size="40" value="<?php echo  i18n::hsc($CONF['SkinsURL']) ?>" /></td>
+            <td><input name="SkinsURL" tabindex="10046" size="40" value="<?php echo  ENTITY::hsc($CONF['SkinsURL']) ?>" /></td>
         </tr><tr>
             <td><?php echo _SETTINGS_ACTIONSURL?> <?php help('actionurl');?></td>
-            <td><input name="ActionURL" tabindex="10047" size="40" value="<?php echo  i18n::hsc($CONF['ActionURL']) ?>" /></td>
+            <td><input name="ActionURL" tabindex="10047" size="40" value="<?php echo  ENTITY::hsc($CONF['ActionURL']) ?>" /></td>
         </tr><tr>
             <td><?php echo _SETTINGS_LANGUAGE?> <?php help('language'); ?>
             </td>
@@ -4830,11 +4830,11 @@ selector();
             </td>
             <td><?php $this->input_yesno('DisableSite',$CONF['DisableSite'],10060); ?>
                     <br />
-                <?php echo _SETTINGS_DISABLESITEURL ?> <input name="DisableSiteURL" tabindex="10070" size="40" value="<?php echo  i18n::hsc($CONF['DisableSiteURL'])?>" />
+                <?php echo _SETTINGS_DISABLESITEURL ?> <input name="DisableSiteURL" tabindex="10070" size="40" value="<?php echo  ENTITY::hsc($CONF['DisableSiteURL'])?>" />
             </td>
         </tr><tr>
             <td><?php echo _SETTINGS_DIRS?></td>
-            <td><?php echo  i18n::hsc($DIR_NUCLEUS) ?>
+            <td><?php echo  ENTITY::hsc($DIR_NUCLEUS) ?>
                 <i><?php echo _SETTINGS_SEECONFIGPHP?></i></td>
         </tr><tr>
             <td><?php echo _SETTINGS_DBLOGIN?></td>
@@ -4896,7 +4896,7 @@ selector();
                     $CONF['DefaultListSize'] = 10;
                 }
             ?>
-                <input name="DefaultListSize" tabindex="10079" size="40" value="<?php echo  i18n::hsc((intval($CONF['DefaultListSize']) < 1 ? '10' : $CONF['DefaultListSize'])) ?>" />
+                <input name="DefaultListSize" tabindex="10079" size="40" value="<?php echo  ENTITY::hsc((intval($CONF['DefaultListSize']) < 1 ? '10' : $CONF['DefaultListSize'])) ?>" />
             </td>
         </tr><tr>
             <td><?php echo _SETTINGS_ADMINCSS?> 
@@ -4942,7 +4942,7 @@ selector();
             <th colspan="2"><?php echo _SETTINGS_MEDIA?> <?php help('media'); ?></th>
         </tr><tr>
             <td><?php echo _SETTINGS_MEDIADIR?></td>
-            <td><?php echo  i18n::hsc($DIR_MEDIA) ?>
+            <td><?php echo  ENTITY::hsc($DIR_MEDIA) ?>
                 <i><?php echo _SETTINGS_SEECONFIGPHP?></i>
                 <?php                   if (!is_dir($DIR_MEDIA))
                         echo "<br /><b>" . _WARNING_NOTADIR . "</b>";
@@ -4955,7 +4955,7 @@ selector();
         </tr><tr>
             <td><?php echo _SETTINGS_MEDIAURL?></td>
             <td>
-                <input name="MediaURL" tabindex="10090" size="40" value="<?php echo  i18n::hsc($CONF['MediaURL']) ?>" />
+                <input name="MediaURL" tabindex="10090" size="40" value="<?php echo  ENTITY::hsc($CONF['MediaURL']) ?>" />
             </td>
         </tr><tr>
             <td><?php echo _SETTINGS_ALLOWUPLOAD?></td>
@@ -4963,12 +4963,12 @@ selector();
         </tr><tr>
             <td><?php echo _SETTINGS_ALLOWUPLOADTYPES?></td>
             <td>
-                <input name="AllowedTypes" tabindex="10100" size="40" value="<?php echo  i18n::hsc($CONF['AllowedTypes']) ?>" />
+                <input name="AllowedTypes" tabindex="10100" size="40" value="<?php echo  ENTITY::hsc($CONF['AllowedTypes']) ?>" />
             </td>
         </tr><tr>
             <td><?php echo _SETTINGS_MAXUPLOADSIZE?></td>
             <td>
-                <input name="MaxUploadSize" tabindex="10105" size="40" value="<?php echo  i18n::hsc($CONF['MaxUploadSize']) ?>" />
+                <input name="MaxUploadSize" tabindex="10105" size="40" value="<?php echo  ENTITY::hsc($CONF['MaxUploadSize']) ?>" />
             </td>
         </tr><tr>
             <td><?php echo _SETTINGS_MEDIAPREFIX?></td>
@@ -5016,13 +5016,13 @@ selector();
             <th colspan="2"><?php echo _SETTINGS_COOKIES_TITLE?> <?php help('cookies'); ?></th>
         </tr><tr>
             <td><?php echo _SETTINGS_COOKIEPREFIX?></td>
-            <td><input name="CookiePrefix" tabindex="10159" size="40" value="<?php echo  i18n::hsc($CONF['CookiePrefix'])?>" /></td>
+            <td><input name="CookiePrefix" tabindex="10159" size="40" value="<?php echo  ENTITY::hsc($CONF['CookiePrefix'])?>" /></td>
         </tr><tr>
             <td><?php echo _SETTINGS_COOKIEDOMAIN?></td>
-            <td><input name="CookieDomain" tabindex="10160" size="40" value="<?php echo  i18n::hsc($CONF['CookieDomain'])?>" /></td>
+            <td><input name="CookieDomain" tabindex="10160" size="40" value="<?php echo  ENTITY::hsc($CONF['CookieDomain'])?>" /></td>
         </tr><tr>
             <td><?php echo _SETTINGS_COOKIEPATH?></td>
-            <td><input name="CookiePath" tabindex="10170" size="40" value="<?php echo  i18n::hsc($CONF['CookiePath'])?>" /></td>
+            <td><input name="CookiePath" tabindex="10170" size="40" value="<?php echo  ENTITY::hsc($CONF['CookiePath'])?>" /></td>
         </tr><tr>
             <td><?php echo _SETTINGS_COOKIESECURE?></td>
             <td><?php $this->input_yesno('CookieSecure',$CONF['CookieSecure'],10180); ?></td>
@@ -5202,7 +5202,7 @@ selector();
                                }
                                else
                                {
-                                       $value = i18n::hsc($value);
+                                       $value = ENTITY::hsc($value);
                                }
                                echo "<tr>\n";
                                echo '<td>' . $key . "</td>\n";
@@ -5373,7 +5373,7 @@ selector();
                                'extrahead' => &$extrahead,
                                'action' => $this->action));
                
-               $baseUrl = i18n::hsc($CONF['AdminURL']);
+               $baseUrl = ENTITY::hsc($CONF['AdminURL']);
                if ( !array_key_exists('AdminCSS',$CONF) )
                {
                        sql_query("INSERT INTO ".sql_table('config')." VALUES ('AdminCSS', 'original')");
@@ -5392,7 +5392,7 @@ selector();
                echo "<!DOCTYPE {$root_element} PUBLIC \"{$this->formal_public_identifier}\" \"{$this->system_identifier}\">\n";
                echo "<{$root_element} xmlns=\"{$this->xhtml_namespace}\" xml:lang=\"{$locale}\" lang=\"{$locale}\">\n";
                echo "<head>\n";
-               echo '<title>' . i18n::hsc($CONF['SiteName']) . " - Admin</title>\n";
+               echo '<title>' . ENTITY::hsc($CONF['SiteName']) . " - Admin</title>\n";
                echo "<link rel=\"stylesheet\" title=\"Nucleus Admin Default\" type=\"text/css\" href=\"{$baseUrl}styles/admin_{$CONF["AdminCSS"]}.css\" />\n";
                echo "<link rel=\"stylesheet\" title=\"Nucleus Admin Default\" type=\"text/css\" href=\"{$baseUrl}styles/addedit.css\" />\n";
                echo "<script type=\"text/javascript\" src=\"{$baseUrl}javascript/edit.js\"></script>\n";
@@ -5403,7 +5403,7 @@ selector();
                echo "<body>\n";
                echo "<div id=\"adminwrapper\">\n";
                echo "<div class=\"header\">\n";
-               echo '<h1>' . i18n::hsc($CONF['SiteName']) . "</h1>\n";
+               echo '<h1>' . ENTITY::hsc($CONF['SiteName']) . "</h1>\n";
                echo "</div>\n";
                echo "<div id=\"container\">\n";
                echo "<div id=\"content\">\n";
@@ -5568,7 +5568,7 @@ selector();
                                echo "<ul>\n";
                                foreach ( $aPluginExtras as $aInfo )
                                {
-                                       echo '<li><a href="' . i18n::hsc($aInfo['url']) . '" title="' . i18n::hsc($aInfo['tooltip']) . '">' . i18n::hsc($aInfo['title']) . "</a></li>\n";
+                                       echo '<li><a href="' . ENTITY::hsc($aInfo['url']) . '" title="' . ENTITY::hsc($aInfo['tooltip']) . '">' . ENTITY::hsc($aInfo['title']) . "</a></li>\n";
                                }
                                echo "</ul>\n";
                        }
@@ -5658,7 +5658,7 @@ selector();
             <?php echo _BOOKMARKLET_BMARKTEXT ?><small><?php echo _BOOKMARKLET_BMARKTEST ?></small>
             <br />
             <br />
-            <?php echo '<a href="' . i18n::hsc($bm) . '">' . sprintf(_BOOKMARKLET_ANCHOR, i18n::hsc($blog->getName())) . '</a>' . _BOOKMARKLET_BMARKFOLLOW; ?>
+            <?php echo '<a href="' . ENTITY::hsc($bm) . '">' . sprintf(_BOOKMARKLET_ANCHOR, ENTITY::hsc($blog->getName())) . '</a>' . _BOOKMARKLET_BMARKFOLLOW; ?>
         </p>
 
         <h3><?php echo _BOOKMARKLET_RIGHTCLICK ?></h3>
@@ -5667,7 +5667,7 @@ selector();
                 $url = 'index.php?action=regfile&blogid=' . intval($blogid);
                 $url = $manager->addTicketToUrl($url);
             ?>
-            <?php echo _BOOKMARKLET_RIGHTTEXT1 . '<a href="' . i18n::hsc($url, ENT_QUOTES, "SJIS") . '">' . _BOOKMARKLET_RIGHTLABEL . '</a>' . _BOOKMARKLET_RIGHTTEXT2; ?>
+            <?php echo _BOOKMARKLET_RIGHTTEXT1 . '<a href="' . ENTITY::hsc($url, ENT_QUOTES, "SJIS") . '">' . _BOOKMARKLET_RIGHTLABEL . '</a>' . _BOOKMARKLET_RIGHTTEXT2; ?>
         </p>
 
         <p>
@@ -5712,7 +5712,7 @@ selector();
 
         ?>
             <h2><?php echo _ACTIONLOG_CLEAR_TITLE?></h2>
-            <p><a href="<?php echo i18n::hsc($url)?>"><?php echo _ACTIONLOG_CLEAR_TEXT?></a></p>
+            <p><a href="<?php echo ENTITY::hsc($url)?>"><?php echo _ACTIONLOG_CLEAR_TEXT?></a></p>
         <?php
         echo '<h2>' . _ACTIONLOG_TITLE . '</h2>';
 
@@ -5769,7 +5769,7 @@ selector();
         $member->blogAdminRights($blogid) or $this->disallow();
 
         $blog =& $manager->getBlog($blogid);
-        $banBlogName =  i18n::hsc($blog->getName());
+        $banBlogName =  ENTITY::hsc($blog->getName());
 
         $this->pagehead();
         ?>
@@ -5780,8 +5780,8 @@ selector();
             <h3><?php echo _BAN_IPRANGE?></h3>
 
             <p>
-                <?php echo _CONFIRMTXT_BAN?> <?php echo i18n::hsc($iprange) ?>
-                <input name="iprange" type="hidden" value="<?php echo i18n::hsc($iprange)?>" />
+                <?php echo _CONFIRMTXT_BAN?> <?php echo ENTITY::hsc($iprange) ?>
+                <input name="iprange" type="hidden" value="<?php echo ENTITY::hsc($iprange)?>" />
             </p>
 
             <h3><?php echo _BAN_BLOGS?></h3>
@@ -5845,7 +5845,7 @@ selector();
         echo "<ul>";
         foreach ($deleted as $delblog) {
             $b =& $manager->getBlog($delblog);
-            echo "<li>" . i18n::hsc($b->getName()). "</li>";
+            echo "<li>" . ENTITY::hsc($b->getName()). "</li>";
         }
         echo "</ul>";
 
@@ -5894,7 +5894,7 @@ selector();
         <div>
         <?php
         if ($ip) {
-            $iprangeVal = i18n::hsc($ip);
+            $iprangeVal = ENTITY::hsc($ip);
         ?>
             <input name="iprange" type="radio" value="<?php echo $iprangeVal ?>" checked="checked" id="ip_fixed" />
             <label for="ip_fixed"><?php echo $iprangeVal ?></label>
@@ -5916,7 +5916,7 @@ selector();
 
         <div>
             <input type="hidden" name="blogid" value="<?php echo $blogid?>" />
-            <input name="allblogs" type="radio" value="0" id="allblogs_one" /><label for="allblogs_one">'<?php echo i18n::hsc($blog->getName())?>'</label>
+            <input name="allblogs" type="radio" value="0" id="allblogs_one" /><label for="allblogs_one">'<?php echo ENTITY::hsc($blog->getName())?>'</label>
             <br />
             <input name="allblogs" type="radio" value="1" checked="checked" id="allblogs_all" /><label for="allblogs_all"><?php echo _BAN_ALLBLOGS?></label>
         </div>
@@ -6173,7 +6173,7 @@ selector();
 <?php
                        foreach($candidates as $name)
                        {
-                               echo '<option value="NP_',$name,'">',i18n::hsc($name),'</option>';
+                               echo '<option value="NP_',$name,'">',ENTITY::hsc($name),'</option>';
                        }
 ?>
                                </select>
@@ -6211,7 +6211,7 @@ selector();
 
         echo '<p><a href="index.php?action=pluginlist">(',_PLUGS_BACK,')</a></p>';
 
-        echo '<h2>',_PLUGS_HELP_TITLE,': ',i18n::hsc($plugName),'</h2>';
+        echo '<h2>',_PLUGS_HELP_TITLE,': ',ENTITY::hsc($plugName),'</h2>';
 
         $plug =& $manager->getPlugin($plugName);
         $helpFile = $DIR_PLUGINS.$plug->getShortName().'/help.html';
@@ -6241,7 +6241,7 @@ selector();
         if ($manager->pluginInstalled($name))
             $this->error(_ERROR_DUPPLUGIN);
         if (!checkPlugin($name))
-            $this->error(_ERROR_PLUGFILEERROR . ' (' . i18n::hsc($name) . ')');
+            $this->error(_ERROR_PLUGFILEERROR . ' (' . ENTITY::hsc($name) . ')');
 
         // get number of currently installed plugins
         $res = sql_query('SELECT * FROM '.sql_table('plugin'));
@@ -6282,7 +6282,7 @@ selector();
             $this->deleteOnePlugin($plugin->getID());
 
             // ...and show error
-            $this->error(_ERROR_NUCLEUSVERSIONREQ . i18n::hsc($plugin->getMinNucleusVersion()));
+            $this->error(_ERROR_NUCLEUSVERSIONREQ . ENTITY::hsc($plugin->getMinNucleusVersion()));
         }
 
         // check if plugin needs a newer Nucleus version
@@ -6292,7 +6292,7 @@ selector();
             $this->deleteOnePlugin($plugin->getID());
 
             // ...and show error
-            $this->error(_ERROR_NUCLEUSVERSIONREQ . i18n::hsc( $plugin->getMinNucleusVersion() . ' patch ' . $plugin->getMinNucleusPatchLevel() ) );
+            $this->error(_ERROR_NUCLEUSVERSIONREQ . ENTITY::hsc( $plugin->getMinNucleusVersion() . ' patch ' . $plugin->getMinNucleusPatchLevel() ) );
         }
 
         $pluginList = $plugin->getPluginDep();
@@ -6305,7 +6305,7 @@ selector();
                 // uninstall plugin again...
                 $this->deleteOnePlugin($plugin->getID());
 
-                $this->error(sprintf(_ERROR_INSREQPLUGIN, i18n::hsc($pluginName)));
+                $this->error(sprintf(_ERROR_INSREQPLUGIN, ENTITY::hsc($pluginName)));
             }
         }
 
@@ -6571,7 +6571,7 @@ selector();
                $extrahead = "<script type=\"text/javascript\" src=\"javascript/numbercheck.js\"></script>\n";
                $this->pagehead($extrahead);
                echo '<p><a href="index.php?action=pluginlist">(' . _PLUGS_BACK . ")</a></p>\n";
-               echo '<h2>' . sprintf(_PLUGIN_OPTIONS_TITLE, i18n::hsc($pname)) . "</h2>\n";
+               echo '<h2>' . sprintf(_PLUGIN_OPTIONS_TITLE, ENTITY::hsc($pname)) . "</h2>\n";
                
                if ( isset($message) )
                {
@@ -6726,7 +6726,7 @@ selector();
                                {
                                        define('_PLUGIN_OPTIONS_TITLE', 'Options for %s');
                                }
-                               echo '<tr><th colspan="2">'.sprintf(_PLUGIN_OPTIONS_TITLE, i18n::hsc($aOption['pfile'])).'</th></tr>';
+                               echo '<tr><th colspan="2">'.sprintf(_PLUGIN_OPTIONS_TITLE, ENTITY::hsc($aOption['pfile'])).'</th></tr>';
                        }
                        
                        $meta = NucleusPlugin::getOptionMeta($aOption['typeinfo']);
@@ -6761,7 +6761,7 @@ selector();
                $id_no  = $id . $value_no;
                
                /* yes option */
-               echo '<input type="radio" id="' . i18n::hsc($id_yes) . '" name="' . i18n::hsc($name) . '" value="' . i18n::hsc($value_yes) . '"';
+               echo '<input type="radio" id="' . ENTITY::hsc($id_yes) . '" name="' . ENTITY::hsc($name) . '" value="' . ENTITY::hsc($value_yes) . '"';
                if ( $name=="admin" )
                {
                        echo ' onclick="selectCanLogin(true);"';
@@ -6771,10 +6771,10 @@ selector();
                        echo " tabindex='$tabindex' checked='checked'";
                }
                echo " />\n";
-               echo '<label for="' . i18n::hsc($id_yes) . '">' . i18n::hsc($text_yes) . "</label>\n";
+               echo '<label for="' . ENTITY::hsc($id_yes) . '">' . ENTITY::hsc($text_yes) . "</label>\n";
                
                /* no option */
-               echo '<input type="radio" id="' . i18n::hsc($id_no) . '" name="' . i18n::hsc($name) . '" value="' . i18n::hsc($value_no) . '"';
+               echo '<input type="radio" id="' . ENTITY::hsc($id_no) . '" name="' . ENTITY::hsc($name) . '" value="' . ENTITY::hsc($value_no) . '"';
                if ( $name=="admin" )
                {
                        echo ' onclick="selectCanLogin(false);"';
@@ -6788,7 +6788,7 @@ selector();
                        echo ' disabled="disabled"';
                }
                echo " />\n";
-               echo '<label for="' . i18n::hsc($id_no) . '">' . i18n::hsc($text_no) . "</label>\n";
+               echo '<label for="' . ENTITY::hsc($id_no) . '">' . ENTITY::hsc($text_no) . "</label>\n";
                
                return;
        }
index ff06c9c..1d6da8d 100644 (file)
@@ -452,7 +452,7 @@ class BLOG {
                        {
                                $template =& $manager->getTemplate($template);
                                $vars = array(
-                                       'query'         => i18n::hsc($query),
+                                       'query'         => ENTITY::hsc($query),
                                        'blogid'        => $this->getID()
                                );
                                echo TEMPLATE::fill($template['SEARCH_NOTHINGFOUND'],$vars);
index 746042c..22e5910 100644 (file)
@@ -115,8 +115,8 @@ class BODYACTIONS extends BaseActions {
                $windowwidth = $width;
                $windowheight = $height;
 
-               $vars['link']                   = i18n::hsc($CONF['MediaURL']. $filename);
-               $vars['text']                   = i18n::hsc($text);
+               $vars['link']                   = ENTITY::hsc($CONF['MediaURL']. $filename);
+               $vars['text']                   = ENTITY::hsc($text);
                $vars['image'] = '<img src="' . $vars['link'] . '" width="' . $width . '" height="' . $height . '" alt="' . $vars['text'] . '" title="' . $vars['text'] . '" />';
                $vars['width']                  = $width;
                $vars['height']                 = $height;
@@ -149,8 +149,8 @@ class BODYACTIONS extends BaseActions {
                        $filename = $this->currentItem->authorid . '/' . $filename;
                }
 
-               $vars['link']                   = i18n::hsc($CONF['MediaURL'] . $filename);
-               $vars['text']                   = i18n::hsc($text);
+               $vars['link']                   = ENTITY::hsc($CONF['MediaURL'] . $filename);
+               $vars['text']                   = ENTITY::hsc($text);
                $vars['media']                  = '<a href="' . $vars['link'] . '">' . $vars['text'] . '</a>';
 
                echo TEMPLATE::fill($this->template['MEDIA_CODE'],$vars);;
@@ -181,14 +181,14 @@ class BODYACTIONS extends BaseActions {
                $windowwidth = $width;
                $windowheight = $height;
 
-               $vars['rawpopuplink']   = $CONF['Self'] . "?imagepopup=" . i18n::hsc($filename) . "&amp;width=$width&amp;height=$height&amp;imagetext=" . urlencode(i18n::hsc($text));
+               $vars['rawpopuplink']   = $CONF['Self'] . "?imagepopup=" . ENTITY::hsc($filename) . "&amp;width=$width&amp;height=$height&amp;imagetext=" . urlencode(ENTITY::hsc($text));
                $vars['popupcode']              = "window.open(this.href,'imagepopup','status=no,toolbar=no,scrollbars=no,resizable=yes,width=$windowwidth,height=$windowheight');return false;";
-               $vars['popuptext']              = i18n::hsc($text);
+               $vars['popuptext']              = ENTITY::hsc($text);
                $vars['popuplink']              = '<a href="' . $vars['rawpopuplink']. '" onclick="'. $vars['popupcode'].'" >' . $vars['popuptext'] . '</a>';
                $vars['width']                  = $width;
                $vars['height']                 = $height;
                $vars['text']                   = $text;
-               $vars['link']                   = i18n::hsc($CONF['MediaURL'] . $filename);
+               $vars['link']                   = ENTITY::hsc($CONF['MediaURL'] . $filename);
                $vars['media']                  = '<a href="' . $vars['link'] . '">' . $vars['popuptext'] . '</a>';
 
                echo TEMPLATE::fill($this->template['POPUP_CODE'],$vars);
index eb33f41..9cb6a20 100644 (file)
@@ -84,7 +84,7 @@ class COMMENT {
                $body = preg_replace("/\n{3,}/", "\n\n", $body);
 
                // encode special characters as entities
-               $body = i18n::hsc($body);
+               $body = ENTITY::hsc($body);
 
                // trim away whitespace and newlines at beginning and end
                $body = trim($body);
@@ -162,7 +162,7 @@ class COMMENT {
                        $displayedUrl = $url;
                }
 
-               return $pre . '<a href="' . $linkedUrl . '" rel="nofollow">' . i18n::hsc(shorten($displayedUrl,30,'...')) . '</a>' . $post;
+               return $pre . '<a href="' . $linkedUrl . '" rel="nofollow">' . ENTITY::hsc(shorten($displayedUrl,30,'...')) . '</a>' . $post;
        }
 
 
index 838dac1..6e0064a 100644 (file)
@@ -370,7 +370,7 @@ class COMMENTACTIONS extends BaseActions {
                }
                else
                {
-                       echo i18n::hsc($this->currentComment['user']);
+                       echo ENTITY::hsc($this->currentComment['user']);
                }
        }
 
index e601e83..af50912 100644 (file)
@@ -94,7 +94,7 @@ class NAVLIST extends ENCAPSULATE {
                $minamount = $this->minamount;
                $maxamount = $this->maxamount;
                $blogid = $this->blogid;
-               $search = i18n::hsc($this->search);
+               $search = ENTITY::hsc($this->search);
                $itemid = $this->itemid;
 
                $prev = $start - $amount;
index 871fc49..87dfc29 100644 (file)
@@ -389,7 +389,7 @@ class ITEMACTIONS extends BaseActions {
          */
        function parse_syndicate_title($maxLength = 100) {
                $syndicated = strip_tags($this->currentItem->title);
-               echo i18n::hsc(shorten($syndicated,$maxLength,'...'));
+               echo ENTITY::hsc(shorten($syndicated,$maxLength,'...'));
        }
 
        /**
@@ -400,10 +400,10 @@ class ITEMACTIONS extends BaseActions {
        function parse_syndicate_description($maxLength = 250, $addHighlight = 0) {
                $syndicated = strip_tags($this->currentItem->body);
                if ($addHighlight) {
-                       $tmp_highlight = i18n::hsc(shorten($syndicated,$maxLength,'...'));
+                       $tmp_highlight = ENTITY::hsc(shorten($syndicated,$maxLength,'...'));
                        echo $this->highlightAndParse($tmp_highlight);
                } else {
-                       echo i18n::hsc(shorten($syndicated,$maxLength,'...'));
+                       echo ENTITY::hsc(shorten($syndicated,$maxLength,'...'));
                }
        }
 
index 0e41417..89ab8d5 100644 (file)
@@ -541,7 +541,7 @@ class MANAGER
        function addTicketHidden()
        {
                $ticket = $this->_generateTicket();
-               echo '<input type="hidden" name="ticket" value="', i18n::hsc($ticket), '" />';
+               echo '<input type="hidden" name="ticket" value="', ENTITY::hsc($ticket), '" />';
                return;
        }
 
index 370f5c4..97d8561 100644 (file)
@@ -245,7 +245,7 @@ class PAGEFACTORY extends BaseActions
         */
        function parse_bloglink()
        {
-               echo '<a href="', i18n::hsc($this->blog->getURL()), '">', i18n::hsc($this->blog->getName()), '</a>';
+               echo '<a href="', ENTITY::hsc($this->blog->getURL()), '">', ENTITY::hsc($this->blog->getName()), '</a>';
        }
 
 
@@ -384,7 +384,7 @@ class PAGEFACTORY extends BaseActions
        function parse_contents($which)
        {
                if (!isset($this->variables[$which])) $this->variables[$which] = '';
-               echo i18n::hsc($this->variables[$which]);
+               echo ENTITY::hsc($this->variables[$which]);
        }
 
 
index 17b24d5..6f01b6b 100644 (file)
@@ -54,7 +54,7 @@ class PluginAdmin {
        function start($extraHead = '')
        {
                global $CONF;
-               $strBaseHref  = '<base href="' . i18n::hsc($CONF['AdminURL']) . '" />';
+               $strBaseHref  = '<base href="' . ENTITY::hsc($CONF['AdminURL']) . '" />';
                $extraHead .= $strBaseHref;
 
                $this->admin->pagehead($extraHead);
@@ -77,7 +77,7 @@ class PluginAdmin {
                        //echo "\n<!--TicketForPlugin skipped-->\n";
                        return;
                }
-               $ticket=i18n::hsc($ticket);
+               $ticket=ENTITY::hsc($ticket);
  
 ?><script type="text/javascript">
 /*<![CDATA[*/
diff --git a/nucleus/libs/entity.php b/nucleus/libs/entity.php
deleted file mode 100644 (file)
index 04ebfd0..0000000
+++ /dev/null
@@ -1,186 +0,0 @@
-<?php
-
-class entity {
-
-       function named_to_numeric ($string) {
-               $string = preg_replace('/(&[0-9A-Za-z]+)(;?\=?|([^A-Za-z0-9\;\:\.\-\_]))/e', "entity::_named('\\1', '\\2') . '\\3'", $string);
-               return $string; 
-       }
-       
-       function normalize_numeric ($string) {
-               global $_entities;
-               $string = preg_replace('/&#([0-9]+)(;)?/e', "'&#x'.dechex('\\1').';'", $string);
-               $string = preg_replace('/&#[Xx](0)*([0-9A-Fa-f]+)(;?|([^A-Za-z0-9\;\:\.\-\_]))/e', "'&#x' . strtoupper('\\2') . ';\\4'", $string);
-               $string = strtr($string, $_entities['cp1251']);
-               return $string;
-       }
-       function numeric_to_utf8 ($string) {
-               $string = preg_replace('/&#([0-9]+)(;)?/e', "'&#x'.dechex('\\1').';'", $string);
-               $string = preg_replace('/&#[Xx](0)*([0-9A-Fa-f]+)(;?|([^A-Za-z0-9\;\:\.\-\_]))/e', "'&#x' . strtoupper('\\2') . ';\\4'", $string);
-               $string = preg_replace('/&#x([0-9A-Fa-f]+);/e', "entity::_hex_to_utf8('\\1')", $string);                
-               return $string;         
-       }
-
-       function numeric_to_named ($string) {
-               global $_entities;
-               $string = preg_replace('/&#[Xx]([0-9A-Fa-f]+)/e', "'&#'.hexdec('\\1')", $string);
-               $string = strtr($string, array_flip($_entities['named']));
-               return $string; 
-       }
-       
-       function specialchars ($string, $type = 'xml') {
-               $apos = $type == 'xml' ? '&apos;' : '&#39;';
-               $specialchars = array (
-                       '&quot;'        => '&quot;',            '&amp;'         => '&amp;',             
-                       '&apos;'        => $apos,                       '&lt;'          => '&lt;',              
-                       '&gt;'          => '&gt;',                      '"'                     => '&quot;',
-                       '&'                     => '&amp;',                     "'"                     => $apos,
-                       '<'                     => '&lt;',                      '>'                     => '&gt;'
-               );
-       
-               $string = preg_replace('/&(#?[Xx]?[0-9A-Za-z]+);/', "[[[ENTITY:\\1]]]", $string);               
-               $string = strtr($string, $specialchars);
-               $string = preg_replace('/\[\[\[ENTITY\:([^\]]+)\]\]\]/', "&\\1;", $string);             
-               return $string;
-       }
-       
-
-       function _hex_to_utf8($s)
-       {
-               $c = hexdec($s);
-       
-               if ($c < 0x80) {
-                       $str = chr($c);
-               }
-               else if ($c < 0x800) {
-                       $str = chr(0xC0 | $c>>6) . chr(0x80 | $c & 0x3F);
-               }
-               else if ($c < 0x10000) {
-                       $str = chr(0xE0 | $c>>12) . chr(0x80 | $c>>6 & 0x3F) . chr(0x80 | $c & 0x3F);
-               }
-               else if ($c < 0x200000) {
-                       $str = chr(0xF0 | $c>>18) . chr(0x80 | $c>>12 & 0x3F) . chr(0x80 | $c>>6 & 0x3F) . chr(0x80 | $c & 0x3F);
-               }
-                               
-               return $str;
-       }               
-
-       function _named($entity, $extra) {
-               global $_entities;
-               
-               if ($extra == '=') return $entity . '=';
-               
-               $length = i18n::strlen($entity);
-
-               while ($length > 0) {
-                       $check = i18n::substr($entity, 0, $length);
-                       if (isset($_entities['named'][$check])) return $_entities['named'][$check] . ';' . i18n::substr($entity, $length);
-                       $length--;
-               }
-               
-               return $entity . ($extra == ';' ? ';' : '');
-       }
-}
-
-
-$_entities['cp1251'] = array (
-       '&#x80;'                => '&#x20AC;',  '&#x82;'                => '&#x201A;',  '&#x83;'                => '&#x192;',   
-       '&#x84;'                => '&#x201E;',  '&#x85;'                => '&#x2026;',  '&#x86;'                => '&#x2020;',  
-       '&#x87;'                => '&#x2021;',  '&#x88;'                => '&#x2C6;',   '&#x89;'                => '&#x2030;',  
-       '&#x8A;'                => '&#x160;',   '&#x8B;'                => '&#x2039;',  '&#x8C;'                => '&#x152;',   
-       '&#x8E;'                => '&#x17D;',   '&#x91;'                => '&#x2018;',  '&#x92;'                => '&#x2019;',  
-       '&#x93;'                => '&#x201C;',  '&#x94;'                => '&#x201D;',  '&#x95;'                => '&#x2022;',  
-       '&#x96;'                => '&#x2013;',  '&#x97;'                => '&#x2014;',  '&#x98;'                => '&#x2DC;',   
-       '&#x99;'                => '&#x2122;',  '&#x9A;'                => '&#x161;',   '&#x9B;'                => '&#x203A;',  
-       '&#x9C;'                => '&#x153;',   '&#x9E;'                => '&#x17E;',   '&#x9F;'                => '&#x178;',   
-);
-       
-$_entities['named'] = array (
-       '&nbsp'                 => '&#160',             '&iexcl'                => '&#161',             '&cent'                 => '&#162',     
-       '&pound'                => '&#163',             '&curren'               => '&#164',             '&yen'                  => '&#165',     
-       '&brvbar'               => '&#166',     '&sect'                 => '&#167',             '&uml'                  => '&#168',     
-       '&copy'                 => '&#169',             '&ordf'                 => '&#170',             '&laquo'                => '&#171',     
-       '&not'                  => '&#172',             '&shy'                  => '&#173',             '&reg'                  => '&#174',     
-       '&macr'                 => '&#175',             '&deg'                  => '&#176',             '&plusmn'               => '&#177',     
-       '&sup2'                 => '&#178',             '&sup3'                 => '&#179',     '&acute'                => '&#180',     
-       '&micro'                => '&#181',     '&para'                 => '&#182',             '&middot'               => '&#183',     
-       '&cedil'                => '&#184',     '&sup1'                 => '&#185',             '&ordm'                 => '&#186',     
-       '&raquo'                => '&#187',             '&frac14'               => '&#188',             '&frac12'               => '&#189',     
-       '&frac34'               => '&#190',             '&iquest'               => '&#191',             '&Agrave'               => '&#192',     
-       '&Aacute'               => '&#193',             '&Acirc'                => '&#194',             '&Atilde'               => '&#195',     
-       '&Auml'                 => '&#196',             '&Aring'                => '&#197',             '&AElig'                => '&#198',     
-       '&Ccedil'               => '&#199',     '&Egrave'               => '&#200',             '&Eacute'               => '&#201',     
-       '&Ecirc'                => '&#202',             '&Euml'                 => '&#203',             '&Igrave'               => '&#204',     
-       '&Iacute'               => '&#205',             '&Icirc'                => '&#206',             '&Iuml'                 => '&#207',     
-       '&ETH'                  => '&#208',             '&Ntilde'               => '&#209',             '&Ograve'               => '&#210',     
-       '&Oacute'               => '&#211',             '&Ocirc'                => '&#212',             '&Otilde'               => '&#213',     
-       '&Ouml'                 => '&#214',             '&times'                => '&#215',             '&Oslash'               => '&#216',     
-       '&Ugrave'               => '&#217',             '&Uacute'               => '&#218',             '&Ucirc'                => '&#219',     
-       '&Uuml'                 => '&#220',             '&Yacute'               => '&#221',             '&THORN'                => '&#222',     
-       '&szlig'                => '&#223',             '&agrave'               => '&#224',             '&aacute'               => '&#225',     
-       '&acirc'                => '&#226',             '&atilde'               => '&#227',             '&auml'                 => '&#228',     
-       '&aring'                => '&#229',             '&aelig'                => '&#230',             '&ccedil'               => '&#231',     
-       '&egrave'               => '&#232',             '&eacute'               => '&#233',             '&ecirc'                => '&#234',     
-       '&euml'                 => '&#235',             '&igrave'               => '&#236',             '&iacute'               => '&#237',     
-       '&icirc'                => '&#238',             '&iuml'                 => '&#239',             '&eth'                  => '&#240',     
-       '&ntilde'               => '&#241',             '&ograve'               => '&#242',             '&oacute'               => '&#243',     
-       '&ocirc'                => '&#244',             '&otilde'               => '&#245',             '&ouml'                 => '&#246',     
-       '&divide'               => '&#247',             '&oslash'               => '&#248',             '&ugrave'               => '&#249',     
-       '&uacute'               => '&#250',             '&ucirc'                => '&#251',             '&uuml'                 => '&#252',     
-       '&yacute'               => '&#253',             '&thorn'                => '&#254',             '&yuml'                 => '&#255',     
-       '&OElig'                => '&#338',             '&oelig'                => '&#229',             '&Scaron'               => '&#352',     
-       '&scaron'               => '&#353',             '&Yuml'                 => '&#376',             '&circ'                 => '&#710',     
-       '&tilde'                => '&#732',     '&esnp'                 => '&#8194',    '&emsp'                 => '&#8195',    
-       '&thinsp'               => '&#8201',    '&zwnj'                 => '&#8204',    '&zwj'                  => '&#8205',    
-       '&lrm'                  => '&#8206',    '&rlm'                  => '&#8207',    '&ndash'                => '&#8211',    
-       '&mdash'                => '&#8212',    '&lsquo'                => '&#8216',    '&rsquo'                => '&#8217',    
-       '&sbquo'                => '&#8218',    '&ldquo'                => '&#8220',    '&rdquo'                => '&#8221',    
-       '&bdquo'                => '&#8222',    '&dagger'               => '&#8224',    '&Dagger'               => '&#8225',    
-       '&permil'               => '&#8240',    '&lsaquo'               => '&#8249',    '&rsaquo'               => '&#8250',
-       '&euro'                 => '&#8364',    '&fnof'                 => '&#402',             '&Alpha'                => '&#913',     
-       '&Beta'                 => '&#914',             '&Gamma'                => '&#915',             '&Delta'                => '&#916',     
-       '&Epsilon'              => '&#917',             '&Zeta'                 => '&#918',             '&Eta'                  => '&#919',     
-       '&Theta'                => '&#920',             '&Iota'                 => '&#921',             '&Kappa'                => '&#922',     
-       '&Lambda'               => '&#923',             '&Mu'                   => '&#924',             '&Nu'                   => '&#925',     
-       '&Xi'                   => '&#926',             '&Omicron'              => '&#927',             '&Pi'                   => '&#928',     
-       '&Rho'                  => '&#929',             '&Sigma'                => '&#931',             '&Tau'                  => '&#932',     
-       '&Upsilon'              => '&#933',     '&Phi'                  => '&#934',             '&Chi'                  => '&#935',     
-       '&Psi'                  => '&#936',             '&Omega'                => '&#937',             '&alpha'                => '&#945',     
-       '&beta'                 => '&#946',             '&gamma'                => '&#947',             '&delta'                => '&#948',     
-       '&epsilon'              => '&#949',             '&zeta'                 => '&#950',             '&eta'                  => '&#951',     
-       '&theta'                => '&#952',             '&iota'                 => '&#953',             '&kappa'                => '&#954',     
-       '&lambda'               => '&#955',             '&mu'                   => '&#956',             '&nu'                   => '&#957',     
-       '&xi'                   => '&#958',             '&omicron'              => '&#959',             '&pi'                   => '&#960',     
-       '&rho'                  => '&#961',             '&sigmaf'               => '&#962',             '&sigma'                => '&#963',     
-       '&tau'                  => '&#964',             '&upsilon'              => '&#965',     '&phi'                  => '&#966',     
-       '&chi'                  => '&#967',             '&psi'                  => '&#968',             '&omega'                => '&#969',     
-       '&thetasym'             => '&#977',             '&upsih'                => '&#978',             '&piv'                  => '&#982',     
-       '&bull'                 => '&#8226',    '&hellip'               => '&#8230',    '&prime'                => '&#8242',    
-       '&Prime'                => '&#8243',    '&oline'                => '&#8254',    '&frasl'                => '&#8260',    
-       '&weierp'               => '&#8472',    '&image'                => '&#8465',    '&real'                 => '&#8476',    
-       '&trade'                => '&#8482',    '&alefsym'              => '&#8501',    '&larr'                 => '&#8592',    
-       '&uarr'                 => '&#8593',    '&rarr'                 => '&#8594',    '&darr'                 => '&#8595',    
-       '&harr'                 => '&#8596',    '&crarr'                => '&#8629',    '&lArr'                 => '&#8656',    
-       '&uArr'                 => '&#8657',    '&rArr'                 => '&#8658',    '&dArr'                 => '&#8659',    
-       '&hArr'                 => '&#8660',    '&forall'               => '&#8704',    '&part'                 => '&#8706',    
-       '&exist'                => '&#8707',    '&empty'                => '&#8709',    '&nabla'                => '&#8711',    
-       '&isin'                 => '&#8712',    '&notin'                => '&#8713',    '&ni'                   => '&#8715',    
-       '&prod'                 => '&#8719',    '&sum'                  => '&#8721',    '&minus'                => '&#8722',    
-       '&lowast'               => '&#8727',    '&radic'                => '&#8730',    '&prop'                 => '&#8733',    
-       '&infin'                => '&#8734',    '&ang'                  => '&#8736',    '&and'                  => '&#8743',    
-       '&or'                   => '&#8744',    '&cap'                  => '&#8745',    '&cup'                  => '&#8746',    
-       '&int'                  => '&#8747',    '&there4'               => '&#8756',    '&sim'                  => '&#8764',    
-       '&cong'                 => '&#8773',    '&asymp'                => '&#8776',    '&ne'                   => '&#8800',    
-       '&equiv'                => '&#8801',    '&le'                   => '&#8804',    '&ge'                   => '&#8805',    
-       '&sub'                  => '&#8834',    '&sup'                  => '&#8835',    '&nsub'                 => '&#8836',    
-       '&sube'                 => '&#8838',    '&supe'                 => '&#8839',    '&oplus'                => '&#8853',    
-       '&otimes'               => '&#8855',    '&perp'                 => '&#8869',    '&sdot'                 => '&#8901',    
-       '&lceil'                => '&#8968',    '&rceil'                => '&#8969',    '&lfloor'               => '&#8970',    
-       '&rfloor'               => '&#8971',    '&lang'                 => '&#9001',    '&rang'                 => '&#9002',    
-       '&loz'                  => '&#9674',    '&spades'               => '&#9824',    '&clubs'                => '&#9827',    
-       '&hearts'               => '&#9829',    '&diams'                => '&#9830',    
-);
-
-
-?>
\ No newline at end of file
index 8a1b832..304b10d 100644 (file)
@@ -469,7 +469,7 @@ include($DIR_LIBS . 'NOTIFICATION.php');
 include($DIR_LIBS . 'BAN.php');
 include($DIR_LIBS . 'PAGEFACTORY.php');
 include($DIR_LIBS . 'SEARCH.php');
-include($DIR_LIBS . 'entity.php');
+include($DIR_LIBS . 'ENTITY.php');
 include($DIR_LIBS . 'Link.php');
 
 /* set lastVisit cookie (if allowed) */
@@ -931,78 +931,6 @@ $manager->notify(
 
 
        /**
-        * This function highlights a specific query in a given HTML text (not within HTML tags) and returns it
-        * @param string $text text to be highlighted
-        * @param string $expression regular expression to be matched (can be an array of expressions as well)
-        * @param string $highlight highlight to be used (use \\0 to indicate the matched expression)
-        * @return string
-        */
-       function highlight($text, $expression, $highlight)
-       {
-
-               if ( !$highlight || !$expression )
-               {
-                       return $text;
-               }
-
-               if ( is_array($expression) && (count($expression) == 0) )
-               {
-                       return $text;
-               }
-
-               // add a tag in front (is needed for preg_match_all to work correctly)
-               $text = '<!--h-->' . $text;
-
-               // split the HTML up so we have HTML tags
-               // $matches[0][i] = HTML + text
-               // $matches[1][i] = HTML
-               // $matches[2][i] = text
-               preg_match_all('/(<[^>]+>)([^<>]*)/', $text, $matches);
-
-               // throw it all together again while applying the highlight to the text pieces
-               $result = '';
-
-               $count_matches = count($matches[2]);
-
-               for ( $i = 0; $i < $count_matches; $i++ )
-               {
-
-                       if ( $i != 0 )
-                       {
-                               $result .= $matches[1][$i];
-                       }
-
-                       if ( is_array($expression) )
-                       {
-
-                               foreach ( $expression as $regex )
-                               {
-
-                                       if ( $regex )
-                                       {
-                                               //$matches[2][$i] = @eregi_replace($regex, $highlight, $matches[2][$i]);
-                                               $matches[2][$i] = @preg_replace('#' . $regex . '#i', $highlight, $matches[2][$i]);
-                                       }
-
-                               }
-
-                               $result .= $matches[2][$i];
-
-                       }
-                       else
-                       {
-                               //$result .= @eregi_replace($expression, $highlight, $matches[2][$i]);
-                               $result .= @preg_replace('#' . $expression . '#i', $highlight, $matches[2][$i]);
-                       }
-
-               }
-
-               return $result;
-
-       }
-
-
-       /**
         * This function parses a query into an array of expressions that can be passed on to the highlight method
         * @param string $query
         */
@@ -1040,6 +968,7 @@ $manager->notify(
                }
        }
 
+
        /**
         * This function gets the blog ID from the blog name
         * @param string $name
@@ -1571,65 +1500,6 @@ function removeBreaks($var) {
 }
 
 /**
- * shortens a text string to maxlength.
- * $suffix is what needs to be added at the end (end length is <= $maxlength)
- *
- * The purpose is to limit the width of string for rendered screen in web browser.
- * So it depends on style sheet, browser's rendering scheme, client's system font.
- *
- * NOTE: In general, non-Latin font such as Japanese, Chinese, Cyrillic have two times as width as Latin fonts,
- *  but this is not always correct, for example, rendered by proportional font.
- *
- * @param string $escaped_string target string
- * @param integer $maxlength maximum length of return string which includes suffix
- * @param string $suffix added in the end of shortened-string
- * @return string
-*/
-function shorten($string, $maxlength, $suffix)
-{
-       static $flag;
-       
-       $decoded_entities_pcre = array();
-       $encoded_entities = array();
-       
-       /* 1. store html entities */
-       preg_match('#&[^&]+?;#', $string, $encoded_entities);
-       if ( !$encoded_entities )
-       {
-               $flag = FALSE;
-       }
-       else
-       {
-               $flag = TRUE;
-       }
-       if ( $flag )
-       {
-               foreach ( $encoded_entities as $encoded_entity )
-               {
-                       $decoded_entities_pcre[] = '#' . html_entity_decode($encoded_entity, ENT_QUOTES, i18n::get_current_charset()) . '#';
-               }
-       }
-       
-       /* 2. decode string */
-       $string = html_entity_decode($string, ENT_QUOTES, i18n::get_current_charset());
-       
-       /* 3. shorten string and add suffix if string length is longer */
-       if ( i18n::strlen($string) > $maxlength - i18n::strlen($suffix) )
-       {
-               $string = i18n::substr($string, 0, $maxlength - i18n::strlen($suffix) );
-               $string .= $suffix;
-       }
-       
-       /* 4. recover entities */
-       if ( $flag )
-       {
-               $string = preg_replace($decoded_entities_pcre, $encoded_entities, $string);
-       }
-       
-       return $string;
-}
-
-/**
   * Converts a unix timestamp to a mysql DATETIME format, and places
   * quotes around it.
   */
@@ -1742,36 +1612,6 @@ function helplink($id) {
 }
 
 /**
- * Deprecated since 4.0:
- * Please use functions in MAIL class instead
- */
-function getMailFooter()
-{
-       NOTIFICATION::get_mail_footer();
-}
-function isValidMailAddress($address)
-{
-       return NOTIFICATION::address_validation($address);
-}
-
-/*
- * Returns the name of the language to use
- * preference priority: member - site
- * defaults to english-utf8 when no good language found
- *
- * NOTE: Deprecated, plugins to use this function should be re-worked as soon as possible!
- * TODO: this will be obsoleted soon.
- */
-function getLanguageName()
-{
-       if( ($language = i18n::convert_locale_to_old_language_file_name(i18n::get_current_locale())) === FALSE )
-       {
-               $language ='english';
-       }
-       return $language;
-}
-
-/**
   * Includes a PHP file. This method can be called while parsing templates and skins
   */
 function includephp($filename) {
@@ -1799,20 +1639,6 @@ function includephp($filename) {
 }
 
 /**
- * Checks if a certain language exists
- * @param string $lang
- * @return bool
- * 
- * NOTE: Deprecated, plugins to use this function should be re-worked as soon as possible!
- * TODO: this will be obsoleted soon.
- **/
-function checkLanguage($lang)
-{
-       return ( preg_match('#^(.+)_(.+)_(.+)$#', $lang)
-         || i18n::convert_old_language_file_name_to_locale($lang) );
-}
-
-/**
  * Checks if a certain plugin exists
  * @param string $plug
  * @return bool
@@ -1830,44 +1656,6 @@ function checkPlugin($plug) {
 }
 
 /**
-  * Centralisation of the functions that generate links
-  * Deprecated since 3.70:
-  * Please use Link::FunctionName(...) instead
-  */
-function createItemLink($itemid, $extra = '') {
-       return Link::createItemLink($itemid, $extra);
-}
-
-function createMemberLink($memberid, $extra = '') {
-       return Link::createMemberLink($memberid, $extra);
-}
-
-function createCategoryLink($catid, $extra = '') {
-       return Link::createCategoryLink($catid, $extra);
-}
-
-function createArchiveListLink($blogid = '', $extra = '') {
-       return Link::createArchiveListLink($blogid, $extra);
-}
-
-function createArchiveLink($blogid, $archive, $extra = '') {
-       return Link::createArchiveLink($blogid, $archive, $extra);
-}
-
-function createBlogidLink($blogid, $params = '') {
-       return Link::createBlogidLink($blogid, $params = '');
-}
-
-function createLink($type, $params) {
-       return Link::createLink($type, $params);
-}
-
-function createBlogLink($url, $params) {
-   return Link::createBlogLink($url, $params);
-}
-
-
-/**
  * @param $querystr
  *             querystring to alter (e.g. foo=1&bar=2&x=y)
  * @param $param
@@ -1912,50 +1700,7 @@ function passVar($key, $value) {
     }
 
     // other values: do stripslashes if needed
-    ?><input type="hidden" name="<?php echo i18n::hsc($key)?>" value="<?php echo i18n::hsc(undoMagic($value) )?>" /><?php
-}
-
-/*
-    Date format functions (to be used from [%date(..)%] skinvars
-*/
-function formatDate($format, $timestamp, $defaultFormat, &$blog) {
-    // apply blog offset (#42)
-    $boffset = $blog ? $blog->getTimeOffset() * 3600 : 0;
-    $offset = date('Z', $timestamp) + $boffset;
-
-    switch ($format) {
-        case 'rfc822':
-            if ($offset >= 0) {
-                $tz = '+';
-            } else {
-                $tz = '-';
-                $offset = -$offset;
-            }
-
-            $tz .= sprintf("%02d%02d", floor($offset / 3600), round(($offset % 3600) / 60) );
-            return date('D, j M Y H:i:s ', $timestamp) . $tz;
-
-        case 'rfc822GMT':
-            $timestamp -= $offset;
-            return date('D, j M Y H:i:s ', $timestamp) . 'GMT';
-
-        case 'utc':
-            $timestamp -= $offset;
-            return date('Y-m-d\TH:i:s\Z', $timestamp);
-
-        case 'iso8601':
-            if ($offset >= 0) {
-                $tz = '+';
-            } else {
-                $tz = '-';
-                $offset = -$offset;
-            }
-            $tz .= sprintf("%02d:%02d", floor($offset / 3600), round(($offset % 3600) / 60) );
-            return date('Y-m-d\TH:i:s', $timestamp) . $tz;
-
-        default :
-            return i18n::strftime($format ? $format : $defaultFormat, $timestamp);
-    }
+    ?><input type="hidden" name="<?php echo ENTITY::hsc($key)?>" value="<?php echo ENTITY::hsc(undoMagic($value) )?>" /><?php
 }
 
 function checkVars($aVars) {
@@ -2186,18 +1931,18 @@ function ticketForPlugin()
                        $qstring = '?' . $qstring;
                }
                
-               echo '<p>' . _SETTINGS_UPDATE . ' : ' . _QMENU_PLUGINS . ' <span style="color:red;">' . i18n::hsc($plugin_name) . "</span> ?</p>\n";
+               echo '<p>' . _SETTINGS_UPDATE . ' : ' . _QMENU_PLUGINS . ' <span style="color:red;">' . ENTITY::hsc($plugin_name) . "</span> ?</p>\n";
                
                switch(strtoupper(serverVar('REQUEST_METHOD') ) )
                {
                        case 'POST':
-                               echo '<form method="POST" action="'.i18n::hsc($uri.$qstring).'">';
+                               echo '<form method="POST" action="'.ENTITY::hsc($uri.$qstring).'">';
                                $manager->addTicketHidden();
                                _addInputTags($post);
                                break;
                        
                        case 'GET':
-                               echo '<form method="GET" action="'.i18n::hsc($uri).'">';
+                               echo '<form method="GET" action="'.ENTITY::hsc($uri).'">';
                                $manager->addTicketHidden();
                                _addInputTags($get);
                        
@@ -2225,8 +1970,8 @@ function _addInputTags(&$keys,$prefix=''){
         else {
             if (get_magic_quotes_gpc()) $value=stripslashes($value);
             if ($key=='ticket') continue;
-            echo '<input type="hidden" name="'.i18n::hsc($key).
-                '" value="'.i18n::hsc($value).'" />'."\n";
+            echo '<input type="hidden" name="'.ENTITY::hsc($key).
+                '" value="'.ENTITY::hsc($value).'" />'."\n";
         }
     }
 }
@@ -2362,92 +2107,15 @@ function redirect($url) {
 }
 
 /**
- * Strip HTML tags from a string
- * This function is a bit more intelligent than a regular call to strip_tags(),
- * because it also deletes the contents of certain tags and cleans up any
- * unneeded whitespace.
- */
-function stringStripTags ($string) {
-    $string = preg_replace("/<del[^>]*>.+<\/del[^>]*>/isU", '', $string);
-    $string = preg_replace("/<script[^>]*>.+<\/script[^>]*>/isU", '', $string);
-    $string = preg_replace("/<style[^>]*>.+<\/style[^>]*>/isU", '', $string);
-    $string = str_replace('>', '> ', $string);
-    $string = str_replace('<', ' <', $string);
-    $string = strip_tags($string);
-    $string = preg_replace("/\s+/", " ", $string);
-    $string = trim($string);
-    return $string;
-}
-
-/**
- * NOTE: Deprecated since 4.0, use i18n::hen()
- * 
- * Make a string containing HTML safe for use in a HTML attribute
- * Tags are stripped and entities are normalized
- */
-function stringToAttribute ($string)
-{
-       return i18n::hsc($string);
-}
-
-/**
- * NOTE: Deprecated since 4.0, use i18n::hsc()
- * 
- * Make a string containing HTML safe for use in a XML document
- * Tags are stripped, entities are normalized and named entities are
- * converted to numeric entities.
- */
-function stringToXML ($string)
-{
-       return i18n::hen($string);
-}
-
-// START: functions from the end of file BLOG.php
-// used for mail notification (html -> text)
-function toAscii($html) {
-    // strip off most tags
-    $html = strip_tags($html,'<a>');
-    $to_replace = "/<a[^>]*href=[\"\']([^\"^']*)[\"\'][^>]*>([^<]*)<\/a>/i";
-    _links_init();
-    $ascii = preg_replace_callback ($to_replace, '_links_add', $html);
-    $ascii .= "\n\n" . _links_list();
-    return strip_tags($ascii);
-}
-
-function _links_init() {
-   global $tmp_links;
-   $tmp_links = array();
-}
-
-function _links_add($match) {
-   global $tmp_links;
-   array_push($tmp_links, $match[1]);
-   return $match[2] . ' [' . sizeof($tmp_links) .']';
-}
-
-function _links_list() {
-   global $tmp_links;
-   $output = '';
-   $i = 1;
-   foreach ($tmp_links as $current) {
-      $output .= "[$i] $current\n";
-      $i++;
-   }
-   return $output;
-}
-// END: functions from the end of file BLOG.php
-
-// START: functions from the end of file ADMIN.php
-/**
  * 
  * replace html entities for plugin description, but available for the other strings
- * NOTE: we can use i18n::hen() or i18n::hsc() alternatively and this is deprecated.
+ * NOTE: we can use ENTITY::hen() or ENTITY::hsc() alternatively and this is deprecated.
  * @param string $data target string
  * @return      string
  */
 function encode_desc($data)
 {
-       return i18n::hen($data);
+       return ENTITY::hen($data);
 }
 
 /*
@@ -2521,4 +2189,117 @@ function cleanFileName($str) {
        return preg_replace("/[^a-z0-9-]/","_",$str).$ext;
 }
 
-?>
\ No newline at end of file
+/**
+ * Centralisation of the functions to send mail
+ * Deprecated since 4.0:
+ * Please use functions in NOTIFICATION class instead
+ */
+function getMailFooter()
+{
+       NOTIFICATION::get_mail_footer();
+}
+function isValidMailAddress($address)
+{
+       return NOTIFICATION::address_validation($address);
+}
+/**
+ * Centralisation of the functions that deals XML entities
+ * Deprecated since 4.0:
+ * Please use ENTITY::FunctionName(...) instead
+ */
+function highlight($text, $expression, $highlight)
+{
+       return ENTITY::highlight($text, $expression, $highlight);
+}
+function shorten($string, $maxlength, $suffix)
+{
+       return ENTITY::shorten($string, $maxlength, $suffix);
+}
+function stringStripTags ($string)
+{
+       return ENTITY::strip_tags($string);
+}
+function toAscii($string)
+{
+       return ENTITY::anchor_footnoting($string);
+}
+function stringToAttribute ($string)
+{
+       return ENTITY::hsc($string);
+}
+function stringToXML ($string)
+{
+       return ENTITY::hen($string);
+}
+
+/**
+ * Centralisation of the functions that deals with locales
+ * This functions is based on the old way to deal with languages
+ * Deprecated since 4.0:
+ */
+/* NOTE: use i18n::get_current_locale() directly instead of this */
+function getLanguageName()
+{
+       if( ($language = i18n::convert_locale_to_old_language_file_name(i18n::get_current_locale())) === FALSE )
+       {
+               $language ='english';
+       }
+       return $language;
+}
+
+/* NOTE: use i18n::get_available_locales() directly instead of this */
+function checkLanguage($lang)
+{
+       return ( preg_match('#^(.+)_(.+)_(.+)$#', $lang)
+         || i18n::convert_old_language_file_name_to_locale($lang) );
+}
+/* NOTE: use i18n::formatted_datetime() directly instead of this */
+function formatDate($format, $timestamp, $default_format, &$blog)
+{
+       if ( !$blog )
+       {
+               $offset = date('Z', $timestamp);
+       }
+       else
+       {
+               $offset = date('Z', $timestamp) + $blog->getTimeOffset() * 3600;
+       }
+       return i18n::formatted_datetime($format, $timestamp, $default_format, $offset);
+}
+
+/**
+ * Centralisation of the functions that generate links
+ * Deprecated since 4.0:
+ * Please use Link::FunctionName(...) instead
+ */
+function createItemLink($itemid, $extra = '') {
+       return Link::createItemLink($itemid, $extra);
+}
+
+function createMemberLink($memberid, $extra = '') {
+       return Link::createMemberLink($memberid, $extra);
+}
+
+function createCategoryLink($catid, $extra = '') {
+       return Link::createCategoryLink($catid, $extra);
+}
+
+function createArchiveListLink($blogid = '', $extra = '') {
+       return Link::createArchiveListLink($blogid, $extra);
+}
+
+function createArchiveLink($blogid, $archive, $extra = '') {
+       return Link::createArchiveLink($blogid, $archive, $extra);
+}
+
+function createBlogidLink($blogid, $params = '') {
+       return Link::createBlogidLink($blogid, $params = '');
+}
+
+function createLink($type, $params) {
+       return Link::createLink($type, $params);
+}
+
+function createBlogLink($url, $params) {
+   return Link::createBlogLink($url, $params);
+}
\ No newline at end of file
index 05c257f..f496515 100644 (file)
@@ -29,7 +29,6 @@ class i18n
         * Initializing i18n class
         * 
         * @static
-        * @access public
         * @param       string  $charset        character set
         * @return      boolean 
         */
@@ -90,7 +89,6 @@ class i18n
         * return available locale list with current charset
         * 
         * @static
-        * @access public
         * @param       void
         * @return      array   available locale list
         */
@@ -104,7 +102,6 @@ class i18n
         * return current charset
         * 
         * @static
-        * @access public
         * @param       void
         * @return      string  $charset        current character set
         */
@@ -123,7 +120,6 @@ class i18n
         * @see 2.  The Language Tag
         * 
         * @static
-        * @access public
         * @param       string  $locale
         * @return      bool    TRUE/FALSE
         * 
@@ -145,7 +141,6 @@ class i18n
         * Get current locale
         * 
         * @static
-        * @access public
         * @param       void
         * @return      $locale
         */
@@ -164,7 +159,6 @@ class i18n
         * http://www.php.net/manual/en/function.date-default-timezone-set.php
         * 
         * @static
-        * @access public
         * @param       void
         * @return      void
         */
@@ -186,7 +180,6 @@ class i18n
         * get current timezone
         * 
         * @static
-        * @access public
         * @param       void
         * @return      $timezone
         */
@@ -196,49 +189,10 @@ class i18n
        }
        
        /**
-        * i18n::hen
-        * htmlentities wrapper
-        * 
-        * @static
-        * @access public
-        * @param       string  $string target string
-        * @param       string  $quotation      quotation mode. please refer to the argument of PHP built-in htmlentities
-        * @return      string  escaped string
-        */
-       static public function hen($string, $quotation=ENT_QUOTES)
-       {
-               $string = html_entity_decode($string, $quotation, self::$charset);
-               return (string) htmlentities($string, $quotation, self::$charset);
-       }
-       
-       /**
-        * i18n::hsc
-        * htmlspecialchars wrapper
-        * 
-        * NOTE: htmlspecialchars_decode() is ASCII-to-ACII conversion
-        *  and its target string consists of several letters.
-        *   There are no problems.
-        * 
-        * @static
-        * @access public
-        * @param       string  $string target string
-        * @param       string  $quotation      quotation mode. please refer to the argument of PHP built-in htmlspecialchars
-        * @return      string  escaped string
-        * 
-        */
-       
-       static public function hsc($string, $quotation=ENT_QUOTES)
-       {
-               $string = htmlspecialchars_decode($string, $quotation);
-               return (string) htmlspecialchars($string, $quotation, self::$charset);
-       }
-       
-       /**
         * i18n::convert
         * character set converter
         * 
         * @static
-        * @access public
         * @param       string  $string target string binary
         * @param       string  $from   original character set encoding
         * @param       string  $to     target character set encoding
@@ -267,7 +221,6 @@ class i18n
         * strlen wrapper
         * 
         * @static
-        * @access public
         * @param       string  $string target string
         * @return      integer the number of letters
         */
@@ -294,7 +247,6 @@ class i18n
         * strpos wrapper
         * 
         * @static
-        * @access public
         * @param       string  $haystack       string to search
         * @param       string  $needle string for search
         * @param       string  $offset the position from which the search should be performed. 
@@ -328,7 +280,6 @@ class i18n
         * strrpos wrapper
         * 
         * @static
-        * @access public
         * @param       string  $haystack       string to search
         * @param       string  $needle string for search
         * @return      integer/FALSE   the numeric position of the last occurrence of needle in haystack
@@ -361,7 +312,6 @@ class i18n
         * substr wrapper
         * 
         * @static
-        * @access public
         * @param       string  $string string to be cut
         * @param       string  $start  the position of starting
         * @param       integer $length the length to be cut
@@ -396,7 +346,6 @@ class i18n
         *  http://www.php.net/manual/en/function.preg-split.php
         * 
         * @static
-        * @access public
         * @param       string  $delimiter      singlebyte or multibyte delimiter
         * @param       string  $target target string
         * @param       integer $limit  the number of index for returned array
@@ -431,7 +380,6 @@ class i18n
         * strftime function based on multibyte processing
         * 
         * @static
-        * @access public
         * @param       string  $format format with singlebyte or multibyte
         * @param       timestamp       $timestamp      UNIX timestamp
         * @return      string  formatted timestamp
@@ -454,8 +402,8 @@ class i18n
                        return $format;
                }
                
-               $format         = trim(preg_replace('#(%[^%])#', ',$1,', $format), ',');
-               $elements       = preg_split('#,#', $format);
+               $format = trim(preg_replace('#(%[^%])#', ',$1,', $format), ',');
+               $elements = preg_split('#,#', $format);
                
                foreach ( $elements as $element )
                {
@@ -477,11 +425,81 @@ class i18n
        }
        
        /**
+        * i18n::formatted_datetime()
+        * return formatted datetime string
+        * 
+        * Date and Time Formats
+        * @link        http://www.w3.org/TR/NOTE-datetime
+        * 
+        * Working with Time Zones
+        * @link        http://www.w3.org/TR/timezone/
+        * 
+        * @param       String  $format timezone format
+        * @param       String  $timestamp      UNIX timestamp
+        * @param       String  $default_format default timezone format
+        * @param       Integer $offset timestamp offset
+        * @return      String  formatted datetime
+        */
+       static public function formatted_datetime($format, $timestamp, $default_format, $offset)
+       {
+               $suffix = '';
+               $string = '';
+               
+               switch ( $format )
+               {
+                       case 'rfc822':
+                               $format = 'D, j M Y H:i:s ';
+                               if ( $offset < 0 )
+                               {
+                                       $suffix = '-';
+                                       $offset = -$offset;
+                               }
+                               else
+                               {
+                                       $suffix = '+';
+                               }
+                               
+                               $suffix .= sprintf("%02d%02d", floor($offset / 3600), round(($offset % 3600) / 60) );
+                               break;
+                       case 'rfc822GMT':
+                               $format = 'D, j M Y H:i:s ';
+                               $timestamp -= $offset;
+                               $suffix = 'GMT';
+                               break;
+                       case 'utc':
+                               $timestamp -= $offset;
+                               $format = 'Y-m-d\TH:i:s\Z';
+                               $suffix = '';
+                               break;
+                       case 'iso8601':
+                               $format = 'Y-m-d\TH:i:s';
+                               if ( $offset < 0 )
+                               {
+                                       $suffix = '-';
+                                       $offset = -$offset;
+                               }
+                               else
+                               {
+                                       $suffix = '+';
+                               }
+                               $suffix .= sprintf("%02d:%02d", floor($offset / 3600), round(($offset % 3600) / 60) );
+                               break;
+                       case '':
+                               $format = $default_format;
+                               $suffix = '';
+                               break;
+                       default:
+                               $suffix = 0;
+                               break;
+               }
+               return i18n::strftime($format, $timestamp) . $suffix;
+       }
+       
+       /**
         * i18n::convert_locale_to_old_language_file_name()
         * NOTE: this should be obsoleted near future.
         * 
         * @static
-        * @access public
         * @param       string  $target_locale  locale name as language_script_region
         * @return      string  old language file name
         */
@@ -511,7 +529,6 @@ class i18n
         * NOTE: this should be obsoleted near future.
         * 
         * @static
-        * @access public
         * @param       string  $target_language        old language file name
         * @return      string  locale name as language_script_region
         */
@@ -542,7 +559,6 @@ class i18n
         * NOTE: this should be obsoleted as soon as possible.
         * 
         * @static
-        * @access private
         */
        static private $lang_refs = array(
                "english"               => "en_Latn_US",
index a2a1791..a3a07ca 100644 (file)
@@ -83,17 +83,17 @@ function listplug_select($template, $type)
                case 'BODY':
                        $current = $template['current'];
 
-                       echo '<option value="' . i18n::hsc($current->value) . '"';
+                       echo '<option value="' . ENTITY::hsc($current->value) . '"';
                        if ( $template['selected'] == $current->value )
                        {
                                echo ' selected="selected" ';
                        }
                        if ( isset($template['shorten']) && $template['shorten'] > 0 )
                        {
-                               echo ' title="'. i18n::hsc($current->text).'"';
-                               $current->text = i18n::hsc(shorten($current->text, $template['shorten'], $template['shortenel']));
+                               echo ' title="'. ENTITY::hsc($current->text).'"';
+                               $current->text = ENTITY::hsc(shorten($current->text, $template['shorten'], $template['shortenel']));
                        }
-                       echo '>' . i18n::hsc($current->text) . "</option>\n";
+                       echo '>' . ENTITY::hsc($current->text) . "</option>\n";
                        break;
                case 'FOOT':
                        echo '</select>';
@@ -155,11 +155,11 @@ function listplug_table_memberlist($template, $type)
                        $id = listplug_nextBatchId();
                        echo "<input type=\"checkbox\" id=\"batch{$id}\" name=\"batch[{$id}]\" value=\"{$current->mnumber}\" />\n";
                        echo "<label for=\"batch{$id}\">\n";
-                       echo '<a href="mailto:' . i18n::hsc($current->memail) . '" tabindex="' . $template['tabindex'] . '">' . i18n::hsc($current->mname), "</a>\n";
+                       echo '<a href="mailto:' . ENTITY::hsc($current->memail) . '" tabindex="' . $template['tabindex'] . '">' . ENTITY::hsc($current->mname), "</a>\n";
                        echo "</label>\n";
                        echo "</td>";
-                       echo "<td>" . i18n::hsc($current->mrealname) . "</td>\n";
-                       echo '<td><a href="' . i18n::hsc($current->murl) . '" tabindex="' . $template['tabindex'] . '">' . i18n::hsc($current->murl) . "</a></td>\n";
+                       echo "<td>" . ENTITY::hsc($current->mrealname) . "</td>\n";
+                       echo '<td><a href="' . ENTITY::hsc($current->murl) . '" tabindex="' . $template['tabindex'] . '">' . ENTITY::hsc($current->murl) . "</a></td>\n";
                        echo '<td>' . ($current->madmin ? _YES : _NO) . "</td>\n";
                        echo '<td>' . ($current->mcanlogin ? _YES : _NO) . "</td>\n";
                        echo '<td><a href="index.php?action=memberedit&amp;memberid=$current->mnumber" tabindex="' . $template['tabindex'] . '">' . _LISTS_EDIT . "</a></td>\n";
@@ -189,16 +189,16 @@ function listplug_table_teamlist($template, $type)
                        $id = listplug_nextBatchId();
                        echo "<input type=\"checkbox\" id=\"batch{$id}\" name=\"batch[{$id}]\" value=\"{$current->tmember}\" />\n";
                        echo '<label for="batch',$id,'">';
-                       echo '<a href="mailto:' . i18n::hsc($current->memail) . '" tabindex="' . $template['tabindex'] . '">' . i18n::hsc($current->mname), "</a>\n";
+                       echo '<a href="mailto:' . ENTITY::hsc($current->memail) . '" tabindex="' . $template['tabindex'] . '">' . ENTITY::hsc($current->mname), "</a>\n";
                        echo "</label>\n";
                        echo "</td>";
-                       echo '<td>', i18n::hsc($current->mrealname), "</td>\n";
+                       echo '<td>', ENTITY::hsc($current->mrealname), "</td>\n";
                        echo '<td>', ($current->tadmin ? _YES : _NO) , "</td>\n";
                        echo "<td><a href=\"index.php?action=teamdelete&amp;memberid=$current->tmember&amp;blogid={$current->tblog}\" tabindex=\"{$template['tabindex']}\">" . _LISTS_DELETE . "</a></td>\n";
                        
                        $url = "index.php?action=teamchangeadmin&memberid={$current->tmember}&blogid={$current->tblog}";
                        $url = $manager->addTicketToUrl($url);
-                       echo '<td><a href="' . i18n::hsc($url) . '" tabindex="' . $template['tabindex'] . '">' . _LIST_TEAM_CHADMIN . "</a></td>\n";
+                       echo '<td><a href="' . ENTITY::hsc($url) . '" tabindex="' . $template['tabindex'] . '">' . _LIST_TEAM_CHADMIN . "</a></td>\n";
                        break;
        }
        return;
@@ -221,25 +221,25 @@ function listplug_table_pluginlist($template, $type)
                        if ( $plug )
                        {
                                echo "<td>\n";
-                               echo '<h3>' . i18n::hsc($plug->getName()) . "</h3>\n";
+                               echo '<h3>' . ENTITY::hsc($plug->getName()) . "</h3>\n";
                                
                                echo "<dl>\n";
                                if ( $plug->getAuthor() )
                                {
                                        echo '<dt>' . _LIST_PLUGS_AUTHOR . "</dt>\n";
-                                       echo '<dd>' . i18n::hsc($plug->getAuthor()) , "</dd>\n";
+                                       echo '<dd>' . ENTITY::hsc($plug->getAuthor()) , "</dd>\n";
                                }
                                
                                if ( $plug->getVersion() )
                                {
                                        echo '<dt>' . _LIST_PLUGS_VER, "</dt>\n";
-                                       echo '<dd>' . i18n::hsc($plug->getVersion()) . "</dd>\n";
+                                       echo '<dd>' . ENTITY::hsc($plug->getVersion()) . "</dd>\n";
                                }
                                
                                if ( $plug->getURL() )
                                {
                                        echo '<dt>' . _LIST_PLUGS_SITE . "<dt>\n";
-                                       echo '<dd><a href="' .  i18n::hsc($plug->getURL()) . '" tabindex="' . $template['tabindex'] . '">リンク</a></dd>' . "\n";
+                                       echo '<dd><a href="' .  ENTITY::hsc($plug->getURL()) . '" tabindex="' . $template['tabindex'] . '">リンク</a></dd>' . "\n";
                                }
                                echo "</dl>\n";
                                echo "</td>\n";
@@ -247,17 +247,17 @@ function listplug_table_pluginlist($template, $type)
                                echo "<td>\n";
                                echo "<dl>\n";
                                echo '<dt>' . _LIST_PLUGS_DESC ."</dt>\n";
-                               echo '<dd>' . i18n::hen($plug->getDescription()) ."</dd>\n";
+                               echo '<dd>' . ENTITY::hen($plug->getDescription()) ."</dd>\n";
                                if ( sizeof($plug->getEventList()) > 0 )
                                {
                                        echo '<dt>' . _LIST_PLUGS_SUBS ."</dt>\n";
-                                       echo '<dd>' . i18n::hsc(implode(', ', $plug->getEventList())) ."</dd>\n";
+                                       echo '<dd>' . ENTITY::hsc(implode(', ', $plug->getEventList())) ."</dd>\n";
                                }
                                
                                if ( sizeof($plug->getPluginDep()) > 0 )
                                {
                                        echo '<dt>' . _LIST_PLUGS_DEP ."</dt>\n";
-                                       echo '<dd>' . i18n::hsc(implode(', ', $plug->getPluginDep())) ."</dd>\n";
+                                       echo '<dd>' . ENTITY::hsc(implode(', ', $plug->getPluginDep())) ."</dd>\n";
                                }
                                
                                /* check dependency */
@@ -282,7 +282,7 @@ function listplug_table_pluginlist($template, $type)
                                if ( count($req) > 0 )
                                {
                                        echo '<dt>' . _LIST_PLUGS_DEPREQ . "</dt>\n";
-                                       echo '<dd>' . i18n::hsc(implode(', ', $req)) . "</dd>\n";
+                                       echo '<dd>' . ENTITY::hsc(implode(', ', $req)) . "</dd>\n";
                                }
                                
                                /* check the database to see if it is up-to-date and notice the user if not */
@@ -297,23 +297,23 @@ function listplug_table_pluginlist($template, $type)
                        }
                        else
                        {
-                               echo '<td colspan="2">' . sprintf(_PLUGINFILE_COULDNT_BELOADED, i18n::hsc($current->pfile)) . "</td>\n";
+                               echo '<td colspan="2">' . sprintf(_PLUGINFILE_COULDNT_BELOADED, ENTITY::hsc($current->pfile)) . "</td>\n";
                        }
                        
                        echo "<td>\n";
                        echo "<ul>\n";
                        $current->pid = (integer) $current->pid;
                        
-                       $url = i18n::hsc($manager->addTicketToUrl("index.php?plugid={$current->pid}&action=pluginup"));
+                       $url = ENTITY::hsc($manager->addTicketToUrl("index.php?plugid={$current->pid}&action=pluginup"));
                        echo "<li><a href=\"{$url}\" tabindex=\"{$template['tabindex']}\">" , _LIST_PLUGS_UP , "</a></li>\n";
                        
-                       $url = i18n::hsc($manager->addTicketToUrl("index.php?plugid={$current->pid}&action=plugindown"));
+                       $url = ENTITY::hsc($manager->addTicketToUrl("index.php?plugid={$current->pid}&action=plugindown"));
                        echo "<li><a href=\"{$url}\" tabindex=\"{$template['tabindex']}\">" . _LIST_PLUGS_DOWN , "</a></li>\n";
                        echo "<li><a href=\"index.php?action=plugindelete&amp;plugid={$current->pid}\" tabindex=\"{$template['tabindex']}\">" . _LIST_PLUGS_UNINSTALL , "</a></li>\n";
                        
                        if ( $plug && ($plug->hasAdminArea() > 0) )
                        {
-                               echo '<li><a href="' , i18n::hsc($plug->getAdminURL()) , '" tabindex="' , $template['tabindex'] , '">' , _LIST_PLUGS_ADMIN , "</a></li>\n";
+                               echo '<li><a href="' , ENTITY::hsc($plug->getAdminURL()) , '" tabindex="' , $template['tabindex'] , '">' , _LIST_PLUGS_ADMIN , "</a></li>\n";
                        }
                        
                        if ( $plug && ($plug->supportsFeature('HelpPage') > 0) )
@@ -374,17 +374,17 @@ function listplug_plugOptionRow($current)
        
        if ( !$current['description'] )
        {
-               echo '<td>' , i18n::hsc($current['name']) . "</td>\n";
+               echo '<td>' , ENTITY::hsc($current['name']) . "</td>\n";
        }
        else
        {
                if ( !defined($current['description']) )
                {
-                       echo '<td>' , i18n::hsc($current['description']) . "</td>\n";
+                       echo '<td>' , ENTITY::hsc($current['description']) . "</td>\n";
                }
                else
                {
-                       echo '<td>' , i18n::hsc(constant($current['description'])) . "</td>\n";
+                       echo '<td>' , ENTITY::hsc(constant($current['description'])) . "</td>\n";
                }
        }
        echo "<td>\n";
@@ -394,10 +394,10 @@ function listplug_plugOptionRow($current)
                        ADMIN::input_yesno($varname, $current['value'], 0, 'yes', 'no');
                        break;
                case 'password':
-                       echo '<input type="password" size="40" maxlength="128" name="',i18n::hsc($varname),'" value="',i18n::hsc($current['value']),"\" />\n";
+                       echo '<input type="password" size="40" maxlength="128" name="',ENTITY::hsc($varname),'" value="',ENTITY::hsc($current['value']),"\" />\n";
                        break;
                case 'select':
-                       echo '<select name="'.i18n::hsc($varname)."\">\n";
+                       echo '<select name="'.ENTITY::hsc($varname)."\">\n";
                        $options = NucleusPlugin::getOptionSelectValues($current['typeinfo']);
                        $options = i18n::explode('|', $options);
                        
@@ -405,19 +405,19 @@ function listplug_plugOptionRow($current)
                        {
                                if ($options[$i+1] == $current['value'])
                                {
-                                       echo '<option value="' . i18n::hsc($options[$i+1]) . '" selected="selected">';
+                                       echo '<option value="' . ENTITY::hsc($options[$i+1]) . '" selected="selected">';
                                }
                                else
                                {
-                                       echo '<option value="' . i18n::hsc($options[$i+1]) . '">';
+                                       echo '<option value="' . ENTITY::hsc($options[$i+1]) . '">';
                                }
                                if ( defined($options[$i]) )
                                {
-                                       echo i18n::hsc(constant($options[$i]));
+                                       echo ENTITY::hsc(constant($options[$i]));
                                }
                                else
                                {
-                                       echo i18n::hsc($options[$i]);
+                                       echo ENTITY::hsc($options[$i]);
                                }
                                echo "</option>\n";
                        }
@@ -428,19 +428,19 @@ function listplug_plugOptionRow($current)
                        //$meta = NucleusPlugin::getOptionMeta($current['typeinfo']);
                        if ( array_key_exists('access', $meta) && $meta['access'] == 'readonly' )
                        {
-                               echo '<textarea class="pluginoption" cols="30" rows="5" name="' . i18n::hsc($varname) . "\" readonly=\"readonly\">\n";
+                               echo '<textarea class="pluginoption" cols="30" rows="5" name="' . ENTITY::hsc($varname) . "\" readonly=\"readonly\">\n";
                        }
                        else
                        {
-                               echo '<textarea class="pluginoption" cols="30" rows="5" name="' . i18n::hsc($varname) . "\">\n";
+                               echo '<textarea class="pluginoption" cols="30" rows="5" name="' . ENTITY::hsc($varname) . "\">\n";
                        }
-                       echo i18n::hsc($current['value']) . "\n";
+                       echo ENTITY::hsc($current['value']) . "\n";
                        echo "</textarea>\n";
                        break;
                case 'text':
                default:
                        //$meta = NucleusPlugin::getOptionMeta($current['typeinfo']);
-                       echo '<input type="text" size="40" maxlength="128" name="',i18n::hsc($varname),'" value="',i18n::hsc($current['value']),'"';
+                       echo '<input type="text" size="40" maxlength="128" name="',ENTITY::hsc($varname),'" value="',ENTITY::hsc($current['value']),'"';
                        if ( array_key_exists('datatype', $meta) && $meta['datatype'] == 'numerical' )
                        {
                                echo ' onkeyup="checkNumeric(this)" onblur="checkNumeric(this)"';
@@ -490,11 +490,11 @@ function listplug_table_itemlist($template, $type)
                        echo "<td{$cssclass}>\n";
                        echo "<dl>\n";
                        echo '<dt>' . _LIST_ITEM_BLOG . "</dt>\n";
-                       echo '<dd>' . i18n::hsc($current->bshortname) . "</dd>\n";
+                       echo '<dd>' . ENTITY::hsc($current->bshortname) . "</dd>\n";
                        echo '<dt>' . _LIST_ITEM_CAT . "</dt>\n";
-                       echo '<dd>' . i18n::hsc($current->cname) . "</dd>\n";
+                       echo '<dd>' . ENTITY::hsc($current->cname) . "</dd>\n";
                        echo '<dt>' . _LIST_ITEM_AUTHOR . "</dt>\n";
-                       echo '<dd>' . i18n::hsc($current->mname) . "</dd>\n";
+                       echo '<dd>' . ENTITY::hsc($current->mname) . "</dd>\n";
                        echo '<dt>' . _LIST_ITEM_DATE . "</dt>\n";
                        echo '<dd>' . date("Y-m-d",$current->itime) . "</dd>\n";
                        echo '<dt>' . _LIST_ITEM_TIME . "</dt>\n";
@@ -507,11 +507,11 @@ function listplug_table_itemlist($template, $type)
                        echo "<td{$cssclass}>\n";
                        echo "<h3>\n";
                        echo "<input type=\"checkbox\" id=\"batch{$id}\" name=\"batch[{$id}]\" value=\"{$current->inumber}\" />\n";
-                       echo "<label for=\"batch{$id}\">" . i18n::hsc(strip_tags($current->ititle)) . "</label>\n";
+                       echo "<label for=\"batch{$id}\">" . ENTITY::hsc(strip_tags($current->ititle)) . "</label>\n";
                        echo "</h3>\n";
                        
                        $current->ibody = strip_tags($current->ibody);
-                       $current->ibody = i18n::hsc(shorten($current->ibody, 300, '...'));
+                       $current->ibody = ENTITY::hsc(shorten($current->ibody, 300, '...'));
                        echo "<p>$current->ibody</p>\n";
                        echo "</td>\n";
                        
@@ -566,19 +566,19 @@ function listplug_table_commentlist($template, $type)
                        echo '<li>' . date("Y-m-d@H:i",$current->ctime) . "</li>\n";
                        if ( isset($current->mname) )
                        {
-                               echo '<li>' . i18n::hsc($current->mname) ,' ', _LIST_COMMENTS_MEMBER . "</li>\n";
+                               echo '<li>' . ENTITY::hsc($current->mname) ,' ', _LIST_COMMENTS_MEMBER . "</li>\n";
                        }
                        else
                        {
-                               echo '<li>' . i18n::hsc($current->cuser) . "</li>\n";
+                               echo '<li>' . ENTITY::hsc($current->cuser) . "</li>\n";
                        }
                        if ( isset($current->cmail) && $current->cmail )
                        {
-                               echo '<li>' . i18n::hsc($current->cmail) . "</li>\n";
+                               echo '<li>' . ENTITY::hsc($current->cmail) . "</li>\n";
                        }
                        if ( isset($current->cemail) && $current->cemail )
                        {
-                               echo '<li>' . i18n::hsc($current->cemail) . "</li>\n";
+                               echo '<li>' . ENTITY::hsc($current->cemail) . "</li>\n";
                        }
                        echo "</ul>\n";
                        echo "</td>\n";
@@ -589,7 +589,7 @@ function listplug_table_commentlist($template, $type)
                        echo "<input type=\"checkbox\" id=\"batch{$id}\" name=\"batch[{$id}\" value=\"{$current->cnumber}\" />\n";
                        echo "<label for=\"batch{$id}\">\n";
                        $current->cbody = strip_tags($current->cbody);
-                       $current->cbody = i18n::hsc(shorten($current->cbody, 300, '...'));
+                       $current->cbody = ENTITY::hsc(shorten($current->cbody, 300, '...'));
                        echo $current->cbody;
                        echo '</label>';
                        echo '</td>';
@@ -598,7 +598,7 @@ function listplug_table_commentlist($template, $type)
                        echo '<td><a href="index.php?action=commentdelete&amp;commentid=' . $current->cnumber . '">' . _LISTS_DELETE . "</a></td>\n";
                        if ( $template['canAddBan'] )
                        {
-                               echo '<td><a href="index.php?action=banlistnewfromitem&amp;itemid=' . $current->citem . '&amp;ip=' . i18n::hsc($current->cip), '" title="' . i18n::hsc($current->chost) . '">' . _LIST_COMMENT_BANIP . "</a></td>\n";
+                               echo '<td><a href="index.php?action=banlistnewfromitem&amp;itemid=' . $current->citem . '&amp;ip=' . ENTITY::hsc($current->cip), '" title="' . ENTITY::hsc($current->chost) . '">' . _LIST_COMMENT_BANIP . "</a></td>\n";
                        }
                        break;
        }
@@ -615,7 +615,7 @@ function listplug_table_bloglist($template, $type)
                        break;
                case 'BODY':
                        $current = $template['current'];
-                       $current->bname = i18n::hsc($current->bname);
+                       $current->bname = ENTITY::hsc($current->bname);
                        
                        echo "<td title=\"blogid:{$current->bnumber} shortname:{$current->bshortname}\"><a href=\"{$current->burl}\"><img src=\"images/globe.gif\" width=\"13\" height=\"13\" alt=\"". _BLOGLIST_TT_VISIT."\" /></a>{$current->bname}</td>\n";
                        echo "<td><a href=\"index.php?action=createitem&amp;blogid={$current->bnumber}\" title=\"" . _BLOGLIST_TT_ADD ."\">" . _BLOGLIST_ADD . "</a></td>\n";
@@ -648,8 +648,8 @@ function listplug_table_shortblognames($template, $type)
                        break;
                case 'BODY':
                        $current = $template['current'];
-                       $current->bshortname = i18n::hsc($current->bshortname);
-                       $current->bname = i18n::hsc($current->bname);
+                       $current->bshortname = ENTITY::hsc($current->bshortname);
+                       $current->bname = ENTITY::hsc($current->bname);
                        
                        echo "<td>{$current->bshortname}</td>\n";
                        echo "<td>{$current->bname}</td>\n";
@@ -668,8 +668,8 @@ function listplug_table_shortnames($template, $type)
                        break;
                case 'BODY':
                        $current = $template['current'];
-                       $current->name = i18n::hsc($current->name);
-                       $current->description = i18n::hsc($current->description);
+                       $current->name = ENTITY::hsc($current->name);
+                       $current->description = ENTITY::hsc($current->description);
                        
                        echo "<td>{$current->name}</td>\n";
                        echo "<td>{$current->description}</td>\n";
@@ -692,8 +692,8 @@ function listplug_table_categorylist($template, $type)
                        $id = listplug_nextBatchId();
                        
                        $current = $template['current'];
-                       $current->cname = i18n::hsc($current->cname);
-                       $current->cdesc = i18n::hsc($current->cdesc);
+                       $current->cname = ENTITY::hsc($current->cname);
+                       $current->cdesc = ENTITY::hsc($current->cdesc);
                        
                        echo "<td>\n";
                        echo "<input type=\"checkbox\" id=\"batch{$id}\" name=\"batch[{$id}]\" value=\"{$current->catid}\" />\n";
@@ -720,11 +720,11 @@ function listplug_table_templatelist($template, $type)
                case 'BODY':
                        $current = $template['current'];
                        $current->tdnumber = (integer) $current->tdnumber;
-                       $current->tdname = i18n::hsc($current->tdname);
-                       $current->tddesc = i18n::hsc($current->tddesc);
+                       $current->tdname = ENTITY::hsc($current->tdname);
+                       $current->tddesc = ENTITY::hsc($current->tddesc);
                        
                        $url = "index.php?action=templateclone&templateid={$current->tdnumber}";
-                       $url = i18n::hsc($manager->addTicketToUrl($url));
+                       $url = ENTITY::hsc($manager->addTicketToUrl($url));
                        
                        echo "<td>{$current->tdname}</td>\n";
                        echo "<td>{$current->tddesc}</td>\n";
@@ -755,8 +755,8 @@ function listplug_table_skinlist($template, $type)
                case 'BODY':
                        $current = $template['current'];
                        $current->sdnumber = (integer) $current->sdnumber;
-                       $current->sdname = i18n::hsc($current->sdname);
-                       $current->sdtype = i18n::hsc($current->sdtype);
+                       $current->sdname = ENTITY::hsc($current->sdname);
+                       $current->sdtype = ENTITY::hsc($current->sdtype);
                        
                        echo "<td>\n";
                        
@@ -788,7 +788,7 @@ function listplug_table_skinlist($template, $type)
                        if ( $current->sdincpref )
                        {
                                echo '<dt>' . _LIST_SKINS_INCPREFIX . "</dt>\n";
-                               echo '<dd>' . i18n::hsc($current->sdincpref) . "</dd>\n";
+                               echo '<dd>' . ENTITY::hsc($current->sdincpref) . "</dd>\n";
                        }
                        echo "</dl>\n";
                        
@@ -801,18 +801,18 @@ function listplug_table_skinlist($template, $type)
                                $has_enlargement = @file_exists($DIR_SKINS . $current->sdincpref . 'preview-large.png');
                                if ( $has_enlargement )
                                {
-                                       echo '<a href="',$CONF['SkinsURL'], i18n::hsc($current->sdincpref),'preview-large.png" title="' . _LIST_SKIN_PREVIEW_VIEWLARGER . "\">\n";
-                                       echo '<img class="skinpreview" src="',$CONF['SkinsURL'], i18n::hsc($current->sdincpref),'preview.png" width="100" height="75" alt="' . $alternatve_text . "\" />\n";
+                                       echo '<a href="',$CONF['SkinsURL'], ENTITY::hsc($current->sdincpref),'preview-large.png" title="' . _LIST_SKIN_PREVIEW_VIEWLARGER . "\">\n";
+                                       echo '<img class="skinpreview" src="',$CONF['SkinsURL'], ENTITY::hsc($current->sdincpref),'preview.png" width="100" height="75" alt="' . $alternatve_text . "\" />\n";
                                        echo "</a><br />\n";
                                }
                                else
                                {
-                                       echo '<img class="skinpreview" src="',$CONF['SkinsURL'], i18n::hsc($current->sdincpref),'preview.png" width="100" height="75" alt="' . $alternatve_text . "\" /><br />\n";
+                                       echo '<img class="skinpreview" src="',$CONF['SkinsURL'], ENTITY::hsc($current->sdincpref),'preview.png" width="100" height="75" alt="' . $alternatve_text . "\" /><br />\n";
                                }
                                
                                if ( @file_exists("{$DIR_SKINS}{$current->sdincpref}readme.html") )
                                {
-                                       $url = $CONF['SkinsURL'] . i18n::hsc($current->sdincpref) . 'readme.html';
+                                       $url = $CONF['SkinsURL'] . ENTITY::hsc($current->sdincpref) . 'readme.html';
                                        $title = sprintf(_LIST_SKIN_README, $current->sdname);
                                        echo "<a href=\"{$url}\" title=\"{$title}\">" . _LIST_SKIN_README_TXT . "</a>\n";
                                }
@@ -823,7 +823,7 @@ function listplug_table_skinlist($template, $type)
                        echo "</td>\n";
                        
                        echo "<td>\n";
-                       echo '<p>' . i18n::hsc($current->sddesc) . "</p>\n";
+                       echo '<p>' . ENTITY::hsc($current->sddesc) . "</p>\n";
                        
                        /* show list of defined parts */
                        $query = "SELECT stype FROM %s WHERE sdesc=%d ORDER BY stype";
@@ -851,7 +851,7 @@ function listplug_table_skinlist($template, $type)
                                        }
                                        $types[$i]  = "<li>\n";
                                        $types[$i] .= helpHtml($article) . "\n";
-                                       $types[$i] .= "<a href=\"index.php?action=skinedittype&amp;skinid={$current->sdnumber}&amp;type={$type}\" tabindex=\"{$template['tabindex']}\">" . i18n::hsc($friendlyNames[$type]) . "</a>\n";
+                                       $types[$i] .= "<a href=\"index.php?action=skinedittype&amp;skinid={$current->sdnumber}&amp;type={$type}\" tabindex=\"{$template['tabindex']}\">" . ENTITY::hsc($friendlyNames[$type]) . "</a>\n";
                                        $types[$i] .= "</li>\n";
                                }
                                echo _LIST_SKINS_DEFINED;
@@ -863,7 +863,7 @@ function listplug_table_skinlist($template, $type)
                        echo "</td>\n";
                        
                        $url = "index.php?action=skinclone&skinid={$current->sdnumber}";
-                       $url = i18n::hsc($manager->addTicketToUrl($url));
+                       $url = ENTITY::hsc($manager->addTicketToUrl($url));
                        echo "<td>\n";
                        echo "<a href=\"{$url}\" tabindex=\"{$template['tabindex']}\">" . _LISTS_CLONE . "</a>\n";
                        echo "</td>\n";
@@ -885,8 +885,8 @@ function listplug_table_draftlist($template, $type)
                        break;
                case 'BODY':
                        $current = $template['current'];
-                       $current->bshortname = i18n::hsc($current->bshortname);
-                       $current->ititle = i18n::hsc(strip_tags($current->ititle));
+                       $current->bshortname = ENTITY::hsc($current->bshortname);
+                       $current->ititle = ENTITY::hsc(strip_tags($current->ititle));
                        
                        echo "<td>{$current->bshortname}</td>\n";
                        echo "<td>{$current->ititle}</td>\n";
@@ -909,9 +909,9 @@ function listplug_table_otherdraftlist($template, $type)
                        break;
                case 'BODY':
                        $current = $template['current'];
-                       $current->bshortname = i18n::hsc($current->bshortname);
-                       $current->ititle = i18n::hsc(strip_tags($current->ititle));
-                       $current->mname = i18n::hsc($current->mname);
+                       $current->bshortname = ENTITY::hsc($current->bshortname);
+                       $current->ititle = ENTITY::hsc(strip_tags($current->ititle));
+                       $current->mname = ENTITY::hsc($current->mname);
                        
                        echo "<td>{$current->bshortname}</td>\n";
                        echo "<td>{$current->ititle}</td>\n";
@@ -933,8 +933,8 @@ function listplug_table_actionlist($template, $type)
                        break;
                case 'BODY':
                        $current = $template['current'];
-                       $current->timestamp = i18n::hsc($current->timestamp);
-                       $current->message = i18n::hsc($current->message);
+                       $current->timestamp = ENTITY::hsc($current->timestamp);
+                       $current->message = ENTITY::hsc($current->message);
                        
                        echo "<td>{$current->timestamp}</td>\n";
                        echo "<td>{$current->message}</td>\n";
@@ -955,12 +955,12 @@ function listplug_table_banlist($template, $type)
                case 'BODY':
                        $current = $template['current'];
                        $current->blogid = (integer) $current->blogid;
-                       $current->iprange = i18n::hsc($current->iprange);
-                       $current->reason = i18n::hsc($current->reason);
+                       $current->iprange = ENTITY::hsc($current->iprange);
+                       $current->reason = ENTITY::hsc($current->reason);
                        
                        echo "<td>{$current->iprange}</td>\n";
                        echo "<td>{$current->reason}</td>\n";
-                       echo "<td><a href=\"index.php?action=banlistdelete&amp;blogid=\"{$current->blogid}&amp;iprange=\"i18n::hsc($current->iprange}\">" . _LISTS_DELETE . "</a></td>\n";
+                       echo "<td><a href=\"index.php?action=banlistdelete&amp;blogid=\"{$current->blogid}&amp;iprange=\"ENTITY::hsc($current->iprange}\">" . _LISTS_DELETE . "</a></td>\n";
                        break;
        }
        return;
index 165f556..fd15934 100644 (file)
@@ -222,11 +222,11 @@ class SKINIMPORT
                        $inames_error .= "<ul>";
                        foreach( $invalidSkinNames as $sName )
                        {
-                               $inames_error .= "<li>".i18n::hsc($sName)."</li>";
+                               $inames_error .= "<li>".ENTITY::hsc($sName)."</li>";
                        }
                        foreach( $invalidTemplateNames as $sName )
                        {
-                               $inames_error .= "<li>".i18n::hsc($sName)."</li>";
+                               $inames_error .= "<li>".ENTITY::hsc($sName)."</li>";
                        }
                        $inames_error .= "</ul>";
                        return $inames_error;
@@ -396,7 +396,7 @@ class SKINIMPORT
                
                if ( $this->debug )
                {
-                       echo 'START: ', i18n::hsc($name), '<br />';
+                       echo 'START: ', ENTITY::hsc($name), '<br />';
                }
                
                switch ( $name )
@@ -446,7 +446,7 @@ class SKINIMPORT
                                $this->currentPartName = $attrs['name'];
                                break;
                        default:
-                               echo _SKINIE_SEELEMENT_UNEXPECTEDTAG . i18n::hsc($name) . '<br />';
+                               echo _SKINIE_SEELEMENT_UNEXPECTEDTAG . ENTITY::hsc($name) . '<br />';
                                break;
                }
                // character data never contains other tags
@@ -461,7 +461,7 @@ class SKINIMPORT
        {
                if ( $this->debug )
                {
-                       echo 'END: ' . i18n::hsc($name) . '<br />';
+                       echo 'END: ' . ENTITY::hsc($name) . '<br />';
                }
                
                if ( $this->parse_charset != i18n::get_current_charset() )
@@ -519,7 +519,7 @@ class SKINIMPORT
                                }
                                break;
                        default:
-                               echo _SKINIE_SEELEMENT_UNEXPECTEDTAG . i18n::hsc($name) . '<br />';
+                               echo _SKINIE_SEELEMENT_UNEXPECTEDTAG . ENTITY::hsc($name) . '<br />';
                                break;
                }
                $this->clear_character_data();
@@ -533,7 +533,7 @@ class SKINIMPORT
        {
                if ( $this->debug )
                {
-                       echo 'NEW DATA: ' . i18n::hsc($data) . '<br />';
+                       echo 'NEW DATA: ' . ENTITY::hsc($data) . '<br />';
                }
                $this->cdata .= $data;
                return;
@@ -679,12 +679,12 @@ class SKINEXPORT {
                // skins
                foreach ( $this->skins as $skinId => $skinName )
                {
-                       echo "\t\t" . '<skin name="' . i18n::hsc($skinName) . '" />' . "\n";
+                       echo "\t\t" . '<skin name="' . ENTITY::hsc($skinName) . '" />' . "\n";
                }
                // templates
                foreach ( $this->templates as $templateId => $templateName )
                {
-                       echo "\t\t" . '<template name="' . i18n::hsc($templateName) . '" />' . "\n";
+                       echo "\t\t" . '<template name="' . ENTITY::hsc($templateName) . '" />' . "\n";
                }
                // extra info
                if ( $this->info )
@@ -699,13 +699,13 @@ class SKINEXPORT {
                        $skinId = intval($skinId);
                        $skinObj = new SKIN($skinId);
                        
-                       echo "\t" . '<skin name="' . i18n::hsc($skinName) . '" type="' . i18n::hsc($skinObj->getContentType()) . '" includeMode="' . i18n::hsc($skinObj->getIncludeMode()) . '" includePrefix="' . i18n::hsc($skinObj->getIncludePrefix()) . '">' . "\n";
-                       echo "\t\t<description>" . i18n::hsc($skinObj->getDescription()) . "</description>\n";
+                       echo "\t" . '<skin name="' . ENTITY::hsc($skinName) . '" type="' . ENTITY::hsc($skinObj->getContentType()) . '" includeMode="' . ENTITY::hsc($skinObj->getIncludeMode()) . '" includePrefix="' . ENTITY::hsc($skinObj->getIncludePrefix()) . '">' . "\n";
+                       echo "\t\t<description>" . ENTITY::hsc($skinObj->getDescription()) . "</description>\n";
                        
                        $res = sql_query('SELECT stype, scontent FROM '. sql_table('skin') .' WHERE sdesc=' . $skinId);
                        while ( $partObj = sql_fetch_object($res) )
                        {
-                               echo "\t\t" . '<part name="',i18n::hsc($partObj->stype) . '">';
+                               echo "\t\t" . '<part name="',ENTITY::hsc($partObj->stype) . '">';
                                echo '<![CDATA[' . $this->escapeCDATA($partObj->scontent) . ']]>';
                                echo "</part>\n\n";
                        }
@@ -717,13 +717,13 @@ class SKINEXPORT {
                {
                        $templateId = intval($templateId);
                        
-                       echo "\t" . '<template name="' . i18n::hsc($templateName) . '">' . "\n";
-                       echo "\t\t<description>" . i18n::hsc(TEMPLATE::getDesc($templateId)) . "</description>\n";
+                       echo "\t" . '<template name="' . ENTITY::hsc($templateName) . '">' . "\n";
+                       echo "\t\t<description>" . ENTITY::hsc(TEMPLATE::getDesc($templateId)) . "</description>\n";
                        
                        $res = sql_query('SELECT tpartname, tcontent FROM '. sql_table('template') .' WHERE tdesc=' . $templateId);
                        while ( $partObj = sql_fetch_object($res) )
                        {
-                               echo "\t\t" . '<part name="' . i18n::hsc($partObj->tpartname) . '">';
+                               echo "\t\t" . '<part name="' . ENTITY::hsc($partObj->tpartname) . '">';
                                echo '<![CDATA[' . $this->escapeCDATA($partObj->tcontent) . ']]>';
                                echo "</part>\n\n";
                        }
index 266dc46..f1f2240 100644 (file)
@@ -34,9 +34,9 @@ if (function_exists('mysql_query') && !function_exists('sql_fetch_assoc'))
        {
 ?>
 <html xmlns="http://www.w3.org/1999/xhtml">
-       <head><title><?php echo i18n::hsc($title)?></title></head>
+       <head><title><?php echo ENTITY::hsc($title)?></title></head>
        <body>
-               <h1><?php echo i18n::hsc($title)?></h1>
+               <h1><?php echo ENTITY::hsc($title)?></h1>
                <?php echo $msg?>
        </body>
 </html>
index 10e5e0c..343aef5 100644 (file)
@@ -35,9 +35,9 @@ if (!function_exists('sql_fetch_assoc'))
        function startUpError($msg, $title) {
                ?>
                <html xmlns="http://www.w3.org/1999/xhtml">
-                       <head><title><?php echo i18n::hsc($title)?></title></head>
+                       <head><title><?php echo ENTITY::hsc($title)?></title></head>
                        <body>
-                               <h1><?php echo i18n::hsc($title)?></h1>
+                               <h1><?php echo ENTITY::hsc($title)?></h1>
                                <?php echo $msg?>
                        </body>
                </html>
index 2dbf361..88fc109 100644 (file)
@@ -1321,7 +1321,7 @@ $cp1252_to_xmlent =
 
                        if($this->debug > 1)
                        {
-                               print "<PRE>\n---SENDING---\n" . i18n::hen($op) . "\n---END---\n</PRE>";
+                               print "<PRE>\n---SENDING---\n" . ENTITY::hen($op) . "\n---END---\n</PRE>";
                                // let the client see this now in case http times out...
                                flush();
                        }
@@ -1464,7 +1464,7 @@ $cp1252_to_xmlent =
 
                        if($this->debug > 1)
                        {
-                               print "<PRE>\n---SENDING---\n" . i18n::hen($payload) . "\n---END---\n</PRE>";
+                               print "<PRE>\n---SENDING---\n" . ENTITY::hen($payload) . "\n---END---\n</PRE>";
                                // let the client see this now in case http times out...
                                flush();
                        }
@@ -1899,7 +1899,7 @@ $cp1252_to_xmlent =
                                // error response
                                $this->errno = $fcode;
                                $this->errstr = $fstr;
-                               //$this->errstr = i18n::hsc($fstr); // XXX: encoding probably shouldn't be done here; fix later.
+                               //$this->errstr = ENTITY::hsc($fstr); // XXX: encoding probably shouldn't be done here; fix later.
                        }
                        else
                        {
@@ -2347,11 +2347,11 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha
                                        print '<PRE>';
                                        foreach($GLOBALS['_xh']['headers'] as $header => $value)
                                        {
-                                               print i18n::hen("HEADER: $header: $value\n");
+                                               print ENTITY::hen("HEADER: $header: $value\n");
                                        }
                                        foreach($GLOBALS['_xh']['cookies'] as $header => $value)
                                        {
-                                               print i18n::hen("COOKIE: $header={$value['value']}\n");
+                                               print ENTITY::hen("COOKIE: $header={$value['value']}\n");
                                        }
                                        print "</PRE>\n";
                                }
@@ -2385,13 +2385,13 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha
                                                                {
                                                                        $data = $degzdata;
                                                                        if($this->debug)
-                                                                       print "<PRE>---INFLATED RESPONSE---[".i18n::strlen($data)." chars]---\n" . i18n::hen($data) . "\n---END---</PRE>";
+                                                                       print "<PRE>---INFLATED RESPONSE---[".i18n::strlen($data)." chars]---\n" . ENTITY::hen($data) . "\n---END---</PRE>";
                                                                }
                                                                elseif($GLOBALS['_xh']['headers']['content-encoding'] == 'gzip' && $degzdata = @gzinflate(i18n::substr($data, 10)))
                                                                {
                                                                        $data = $degzdata;
                                                                        if($this->debug)
-                                                                       print "<PRE>---INFLATED RESPONSE---[".i18n::strlen($data)." chars]---\n" . i18n::hen($data) . "\n---END---</PRE>";
+                                                                       print "<PRE>---INFLATED RESPONSE---[".i18n::strlen($data)." chars]---\n" . ENTITY::hen($data) . "\n---END---</PRE>";
                                                                }
                                                                else
                                                                {
@@ -2428,7 +2428,7 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha
                {
                        if($this->debug)
                        {
-                               print "<PRE>---GOT---\n" . i18n::hen($data) . "\n---END---\n</PRE>";
+                               print "<PRE>---GOT---\n" . ENTITY::hen($data) . "\n---END---\n</PRE>";
                        }
 
                        if($data == '')
@@ -2467,7 +2467,7 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha
                                        $start += i18n::strlen('<!-- SERVER DEBUG INFO (BASE64 ENCODED):');
                                        $end = i18n::strpos($data, '-->', $start);
                                        $comments = i18n::substr($data, $start, $end-$start);
-                                       print "<PRE>---SERVER DEBUG INFO (DECODED) ---\n\t".i18n::hen(str_replace("\n", "\n\t", base64_decode($comments)))."\n---END---\n</PRE>";
+                                       print "<PRE>---SERVER DEBUG INFO (DECODED) ---\n\t".ENTITY::hen(str_replace("\n", "\n\t", base64_decode($comments)))."\n---END---\n</PRE>";
                                }
                        }
 
@@ -2593,7 +2593,7 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha
                                if ($this->debug)
                                {
                                        print "<PRE>---PARSED---\n";
-                                       print i18n::hsc(var_export($GLOBALS['_xh']['value'], true));
+                                       print ENTITY::hsc(var_export($GLOBALS['_xh']['value'], true));
                                        print "\n---END---</PRE>";
                                }
 
index 2c19806..750a9de 100644 (file)
@@ -116,26 +116,26 @@ function media_select() {
        if (sizeof($collections) > 1) {
        ?>
                <form method="post" action="media.php"><div>
-                       <label for="media_collection"><?php echo i18n::hsc(_MEDIA_COLLECTION_LABEL)?></label>
+                       <label for="media_collection"><?php echo ENTITY::hsc(_MEDIA_COLLECTION_LABEL)?></label>
                        <select name="collection" id="media_collection">
                                <?php                                   foreach ($collections as $dirname => $description) {
-                                               echo '<option value="',i18n::hsc($dirname),'"';
+                                               echo '<option value="',ENTITY::hsc($dirname),'"';
                                                if ($dirname == $currentCollection) {
                                                        echo ' selected="selected"';
                                                }
-                                               echo '>',i18n::hsc($description),'</option>';
+                                               echo '>',ENTITY::hsc($description),'</option>';
                                        }
                                ?>
                        </select>
-                       <input type="submit" name="action" value="<?php echo i18n::hsc(_MEDIA_COLLECTION_SELECT) ?>" title="<?php echo i18n::hsc(_MEDIA_COLLECTION_TT)?>" />
-                       <input type="submit" name="action" value="<?php echo i18n::hsc(_MEDIA_UPLOAD_TO) ?>" title="<?php echo i18n::hsc(_MEDIA_UPLOADLINK) ?>" />
+                       <input type="submit" name="action" value="<?php echo ENTITY::hsc(_MEDIA_COLLECTION_SELECT) ?>" title="<?php echo ENTITY::hsc(_MEDIA_COLLECTION_TT)?>" />
+                       <input type="submit" name="action" value="<?php echo ENTITY::hsc(_MEDIA_UPLOAD_TO) ?>" title="<?php echo ENTITY::hsc(_MEDIA_UPLOADLINK) ?>" />
                        <?php $manager->addTicketHidden() ?>
                </div></form>
        <?php   } else {
        ?>
                <form method="post" action="media.php" style="float:right"><div>
-                       <input type="hidden" name="collection" value="<?php echo i18n::hsc($currentCollection)?>" />
-                       <input type="submit" name="action" value="<?php echo i18n::hsc(_MEDIA_UPLOAD_NEW) ?>" title="<?php echo i18n::hsc(_MEDIA_UPLOADLINK) ?>" />
+                       <input type="hidden" name="collection" value="<?php echo ENTITY::hsc($currentCollection)?>" />
+                       <input type="submit" name="action" value="<?php echo ENTITY::hsc(_MEDIA_UPLOAD_NEW) ?>" title="<?php echo ENTITY::hsc(_MEDIA_UPLOADLINK) ?>" />
                        <?php $manager->addTicketHidden() ?>
                </div></form>
        <?php   } // if sizeof
@@ -146,10 +146,10 @@ function media_select() {
 
        ?>
                <form method="post" action="media.php"><div>
-                       <label for="media_filter"><?php echo i18n::hsc(_MEDIA_FILTER_LABEL)?></label>
-                       <input id="media_filter" type="text" name="filter" value="<?php echo i18n::hsc($filter)?>" />
-                       <input type="submit" name="action" value="<?php echo i18n::hsc(_MEDIA_FILTER_APPLY) ?>" />
-                       <input type="hidden" name="collection" value="<?php echo i18n::hsc($currentCollection)?>" />
+                       <label for="media_filter"><?php echo ENTITY::hsc(_MEDIA_FILTER_LABEL)?></label>
+                       <input id="media_filter" type="text" name="filter" value="<?php echo ENTITY::hsc($filter)?>" />
+                       <input type="submit" name="action" value="<?php echo ENTITY::hsc(_MEDIA_FILTER_APPLY) ?>" />
+                       <input type="hidden" name="collection" value="<?php echo ENTITY::hsc($currentCollection)?>" />
                        <input type="hidden" name="offset" value="<?php echo intval($offset)?>" />
                </div></form>
 
@@ -157,7 +157,7 @@ function media_select() {
 
        ?>
                <table width="100%">
-               <caption><?php echo _MEDIA_COLLECTION_LABEL . i18n::hsc($collections[$currentCollection])?></caption>
+               <caption><?php echo _MEDIA_COLLECTION_LABEL . ENTITY::hsc($collections[$currentCollection])?></caption>
                <tr>
                 <th><?php echo _MEDIA_MODIFIED?></th><th><?php echo _MEDIA_FILENAME?></th><th><?php echo _MEDIA_DIMENSIONS?></th>
                </tr>
@@ -201,22 +201,22 @@ function media_select() {
 
                        if ($filetype != 0) {
                                // image (gif/jpg/png/swf)
-                               echo "<td><a href=\"media.php\" onclick=\"chooseImage('", i18n::hsc($jsCurrentCollection), "','", i18n::hsc($jsFileName), "',"
-                                                          . "'", i18n::hsc($width), "','" , i18n::hsc($height), "'"
-                                                          . ")\" title=\"" . i18n::hsc($obj->filename). "\">"
-                                                          . i18n::hsc(shorten($obj->filename,25,'...'))
+                               echo "<td><a href=\"media.php\" onclick=\"chooseImage('", ENTITY::hsc($jsCurrentCollection), "','", ENTITY::hsc($jsFileName), "',"
+                                                          . "'", ENTITY::hsc($width), "','" , ENTITY::hsc($height), "'"
+                                                          . ")\" title=\"" . ENTITY::hsc($obj->filename). "\">"
+                                                          . ENTITY::hsc(shorten($obj->filename,25,'...'))
                                                           ."</a>";
-                               echo ' (<a href="', i18n::hsc($CONF['MediaURL'] . $currentCollection . '/' . $obj->filename), '" onclick="window.open(this.href); return false;" title="',i18n::hsc(_MEDIA_VIEW_TT),'">',_MEDIA_VIEW,'</a>)';
+                               echo ' (<a href="', ENTITY::hsc($CONF['MediaURL'] . $currentCollection . '/' . $obj->filename), '" onclick="window.open(this.href); return false;" title="',ENTITY::hsc(_MEDIA_VIEW_TT),'">',_MEDIA_VIEW,'</a>)';
                                echo "</td>";
                        } else {
                                // no image (e.g. mpg)
-                               echo "<td><a href='media.php' onclick=\"chooseOther('" , i18n::hsc($jsCurrentCollection), "','", i18n::hsc($jsFileName), "'"
-                                                          . ")\" title=\"" . i18n::hsc($obj->filename). "\">"
-                                                          . i18n::hsc(shorten($obj->filename,30,'...'))
+                               echo "<td><a href='media.php' onclick=\"chooseOther('" , ENTITY::hsc($jsCurrentCollection), "','", ENTITY::hsc($jsFileName), "'"
+                                                          . ")\" title=\"" . ENTITY::hsc($obj->filename). "\">"
+                                                          . ENTITY::hsc(shorten($obj->filename,30,'...'))
                                                           ."</a></td>";
 
                        }
-                       echo '<td>' , i18n::hsc($width) , 'x' , i18n::hsc($height) , '</td>';
+                       echo '<td>' , ENTITY::hsc($width) , 'x' , ENTITY::hsc($height) , '</td>';
                        echo '</tr>';
                }
        } // if (sizeof($arr)>0)
@@ -267,17 +267,17 @@ function media_choose() {
                <br /><br /><label for="upload_collection">Collection:</label>
                <br /><select name="collection" id="upload_collection">
                        <?php                           foreach ($collections as $dirname => $description) {
-                                       echo '<option value="',i18n::hsc($dirname),'"';
+                                       echo '<option value="',ENTITY::hsc($dirname),'"';
                                        if ($dirname == $currentCollection) {
                                                echo ' selected="selected"';
                                        }
-                                       echo '>',i18n::hsc($description),'</option>';
+                                       echo '>',ENTITY::hsc($description),'</option>';
                                }
                        ?>
                </select>
        <?php           } else {
        ?>
-               <input name="collection" type="hidden" value="<?php echo i18n::hsc(requestVar('collection'))?>" />
+               <input name="collection" type="hidden" value="<?php echo ENTITY::hsc(requestVar('collection'))?>" />
        <?php           } // if sizeof
        ?>
        <br /><br />
@@ -372,7 +372,7 @@ function media_loginAndPassThrough() {
                <form method="post" action="media.php">
                <div>
                        <input name="action" value="login" type="hidden" />
-                       <input name="collection" value="<?php echo i18n::hsc(requestVar('collection'))?>" type="hidden" />
+                       <input name="collection" value="<?php echo ENTITY::hsc(requestVar('collection'))?>" type="hidden" />
                        <?php echo _LOGINFORM_NAME?>: <input name="login" />
                        <br /><?php echo _LOGINFORM_PWD?>: <input name="password" type="password" />
                        <br /><input type="submit" value="<?php echo _LOGIN?>" />
index 8bdc54b..c570311 100644 (file)
@@ -179,7 +179,7 @@ class NP_SecurityEnforcer extends NucleusPlugin
                {
                        $data['success'] = 0;
                        $data['allowlocal'] = 0;
-                       $info = sprintf(_SECURITYENFORCER_LOGIN_DISALLOWED, i18n::hsc($login), i18n::hsc($ip));
+                       $info = sprintf(_SECURITYENFORCER_LOGIN_DISALLOWED, ENTITY::hsc($login), ENTITY::hsc($ip));
                        ACTIONLOG::add(INFO, $info);
                }
                return;
index 487d425..5417cc3 100644 (file)
@@ -74,8 +74,8 @@ if ( sql_num_rows($result) )
        while( $row = sql_fetch_assoc($result) )
        {
                echo '<tr>';
-               echo '<td>'.i18n::hsc($row['login']).'</td>';
-               echo '<td><input type="checkbox" name="unlock[]" value="'.i18n::hsc($row['login']).'" />'._SECURITYENFORCER_UNLOCK.'</td>';
+               echo '<td>'.ENTITY::hsc($row['login']).'</td>';
+               echo '<td><input type="checkbox" name="unlock[]" value="'.ENTITY::hsc($row['login']).'" />'._SECURITYENFORCER_UNLOCK.'</td>';
                echo '</tr>';
        }
 }
index 275f0df..cfdf21c 100644 (file)
        
                global $pluginUrl;
                
-               $result  = '<a href="' . i18n::hsc($pluginUrl) . '" title="Go back to &laquo;skins&raquo;">';
-               $result .= '<img src="' . i18n::hsc($pluginUrl . 'home.gif') . '" alt="" /> skins</a> / ';
+               $result  = '<a href="' . ENTITY::hsc($pluginUrl) . '" title="Go back to &laquo;skins&raquo;">';
+               $result .= '<img src="' . ENTITY::hsc($pluginUrl . 'home.gif') . '" alt="" /> skins</a> / ';
 
                $parts = i18n::explode('/', $relative);
                $part = '';
                        if ($v != '') {
                                $part .= $v . '/';
                                
-                               $result .= '<a href="' . i18n::hsc($pluginUrl . '?dir=' . rawurlencode($part)) . '" ';
-                               $result .= 'title="Go back to &laquo;' . i18n::hsc($v) . '&raquo;">';
-                               $result .= '<img src="' . i18n::hsc($pluginUrl . 'dir.gif') . '" alt="" /> ';
-                               $result .= i18n::hsc($v) . '</a> / ';
+                               $result .= '<a href="' . ENTITY::hsc($pluginUrl . '?dir=' . rawurlencode($part)) . '" ';
+                               $result .= 'title="Go back to &laquo;' . ENTITY::hsc($v) . '&raquo;">';
+                               $result .= '<img src="' . ENTITY::hsc($pluginUrl . 'dir.gif') . '" alt="" /> ';
+                               $result .= ENTITY::hsc($v) . '</a> / ';
                        }
                }
                
                        
                        if (is_readable ($directory . $name)) 
                        {
-                               echo '<a href="' . i18n::hsc($pluginUrl . '?dir=' . rawurlencode($dir)) . '">';
-                               echo '<img src="' . i18n::hsc($pluginUrl . 'dir.gif') . '" alt="folder" /> ';
-                               echo i18n::hsc($name).'</a>';                   
+                               echo '<a href="' . ENTITY::hsc($pluginUrl . '?dir=' . rawurlencode($dir)) . '">';
+                               echo '<img src="' . ENTITY::hsc($pluginUrl . 'dir.gif') . '" alt="folder" /> ';
+                               echo ENTITY::hsc($name).'</a>';                 
                        }
                        else
                        {
-                               echo '<img src="' . i18n::hsc($pluginUrl . 'dir.gif') . '" alt="folder" /> ';
-                               echo i18n::hsc($name);                  
+                               echo '<img src="' . ENTITY::hsc($pluginUrl . 'dir.gif') . '" alt="folder" /> ';
+                               echo ENTITY::hsc($name);                        
                        }
                                                
                        echo '</td>';
                        
                        
                        if (is_writable($directory . $name)) {
-                               echo '<td><a href="' . i18n::hsc($renUrl) . '" title="' . _SKINFILES_RENAME . ' &laquo;' . i18n::hsc($name) . '&raquo;">' . _SKINFILES_RENAME . '</a></td>';
+                               echo '<td><a href="' . ENTITY::hsc($renUrl) . '" title="' . _SKINFILES_RENAME . ' &laquo;' . ENTITY::hsc($name) . '&raquo;">' . _SKINFILES_RENAME . '</a></td>';
                        } else {
                                echo '<td>&nbsp;</td>';
                        }
                        
                        if (is_writable($directory . $name) && sfDirectoryIsEmpty($directory . $name)) {
-                               echo '<td><a href="' . i18n::hsc($delUrl) . '" title="' . _SKINFILES_DELETE . ' &laquo;' . i18n::hsc($name) . '&raquo;">' . _SKINFILES_DELETE . '</a></td>';
+                               echo '<td><a href="' . ENTITY::hsc($delUrl) . '" title="' . _SKINFILES_DELETE . ' &laquo;' . ENTITY::hsc($name) . '&raquo;">' . _SKINFILES_DELETE . '</a></td>';
                        } else {
                                echo '<td>&nbsp;</td>';
                        }
                        
                        if (is_readable ($directory . $name) && sfAllowViewing($name)) 
                        {
-                               echo '<a href="' . i18n::hsc($viewUrl) . '">';
-                               echo '<img src="' . i18n::hsc(sfIcon($name)) . '" alt="" /> ';
-                               echo i18n::hsc($name).'</a>';
+                               echo '<a href="' . ENTITY::hsc($viewUrl) . '">';
+                               echo '<img src="' . ENTITY::hsc(sfIcon($name)) . '" alt="" /> ';
+                               echo ENTITY::hsc($name).'</a>';
                        }
                        else
                        {
-                               echo '<img src="' . i18n::hsc(sfIcon($name)) . '" alt="" /> ';
-                               echo i18n::hsc($name);
+                               echo '<img src="' . ENTITY::hsc(sfIcon($name)) . '" alt="" /> ';
+                               echo ENTITY::hsc($name);
                        }
 
                        echo '</td><td>';
                        echo '</td><td>';
                                
                        if (is_writable($directory . $name)) {
-                               echo '<a href="' . i18n::hsc($renUrl) . '" title="' . _SKINFILES_RENAME . ' &laquo;' . i18n::hsc($name) . '&raquo;">' . _SKINFILES_RENAME . '</a>';
+                               echo '<a href="' . ENTITY::hsc($renUrl) . '" title="' . _SKINFILES_RENAME . ' &laquo;' . ENTITY::hsc($name) . '&raquo;">' . _SKINFILES_RENAME . '</a>';
                        } else {
                                echo '&nbsp;';
                        }
                        echo '</td><td>';
 
                        if (is_writable($directory . $name)) {
-                               echo '<a href="' . i18n::hsc($delUrl) . '" title="' . _SKINFILES_DELETE . ' &laquo;' . i18n::hsc($name) . '&raquo;">' . _SKINFILES_DELETE . '</a>';
+                               echo '<a href="' . ENTITY::hsc($delUrl) . '" title="' . _SKINFILES_DELETE . ' &laquo;' . ENTITY::hsc($name) . '&raquo;">' . _SKINFILES_DELETE . '</a>';
                        } else {
                                echo '&nbsp;';
                        }
                        echo '</td><td>';
                        
                        if (is_writable($directory . $name) && sfAllowEditing($name))
-                               echo '<a href="'. i18n::hsc($editUrl) . '" title="' . _SKINFILES_EDIT . ' &laquo;' . i18n::hsc($name) . '&raquo;">' . _SKINFILES_EDIT . '</a>';
+                               echo '<a href="'. ENTITY::hsc($editUrl) . '" title="' . _SKINFILES_EDIT . ' &laquo;' . ENTITY::hsc($name) . '&raquo;">' . _SKINFILES_EDIT . '</a>';
                        else
                                echo '&nbsp;';
 
                        echo '</td><td>';
                        
                        if (is_readable ($directory . $name))
-                               echo '<a href="' . i18n::hsc($dlUrl) . '" title="' . _SKINFILES_DOWNLOAD . ' &laquo;' . i18n::hsc($name) . '&raquo;">' . _SKINFILES_DOWNLOAD . '</a>';
+                               echo '<a href="' . ENTITY::hsc($dlUrl) . '" title="' . _SKINFILES_DOWNLOAD . ' &laquo;' . ENTITY::hsc($name) . '&raquo;">' . _SKINFILES_DOWNLOAD . '</a>';
                        else
                                echo '&nbsp;';
                                
                        if (is_writable($directory)) {
                                echo '<div class="dialogbox">';
                                echo '<h4 class="light">' . _SKINFILES_CREATE_NEW_FILE . '</h4><div>';
-                               echo '<form method="post" action="' . i18n::hsc($pluginUrl) . '">';
+                               echo '<form method="post" action="' . ENTITY::hsc($pluginUrl) . '">';
                                $manager->addTicketHidden();
                                echo '<input type="hidden" name="action" value="createfile" />';
-                               echo '<input type="hidden" name="dir" value="' . i18n::hsc($relative) . '" />';
+                               echo '<input type="hidden" name="dir" value="' . ENTITY::hsc($relative) . '" />';
                                echo '<input type="text" name="name" size="40" value="untitled.txt" />';
                                echo '<p class="buttons"><input type="submit" value="' . _SKINFILES_CREATE_FILE . '" /></p></form>';
                                echo '</div></div>';
        
                                echo '<div class="dialogbox">';
                                echo '<h4 class="light">' . _SKINFILES_UPLOAD_NEW_FILE . '</h4><div>';
-                               echo '<form method="post" enctype="multipart/form-data" action="' . i18n::hsc($pluginUrl) . '">';
+                               echo '<form method="post" enctype="multipart/form-data" action="' . ENTITY::hsc($pluginUrl) . '">';
                                $manager->addTicketHidden();
                                echo '<input type="hidden" name="action" value="uploadfile" />';
-                               echo '<input type="hidden" name="dir" value="' . i18n::hsc($relative) . '" />';
+                               echo '<input type="hidden" name="dir" value="' . ENTITY::hsc($relative) . '" />';
                                echo '<input type="hidden" name="MAX_FILE_SIZE" value="' . $CONF['MaxUploadSize'] . '" />';
                                echo '<input type="file" name="name" size="40" />';
                                echo '<p class="buttons"><input type="submit" value="' . _SKINFILES_UPLOAD . '" /></p></form>';
                        if (count($files)) {
                                echo '<div class="dialogbox">';
                                echo '<h4 class="light">' . _SKINFILES_DEL_ALL_FILES . '</h4><div>';
-                               echo '<form method="post" action="' . i18n::hsc($pluginUrl) . '">';
+                               echo '<form method="post" action="' . ENTITY::hsc($pluginUrl) . '">';
                                $manager->addTicketHidden();
                                echo '<input type="hidden" name="action" value="emptydir" />';
-                               echo '<input type="hidden" name="dir" value="' . i18n::hsc($relative) . '" />';
+                               echo '<input type="hidden" name="dir" value="' . ENTITY::hsc($relative) . '" />';
                                echo _SKINFILES_DEL_ALL_FILES_MSG;
                                echo '<p class="buttons"><input type="submit" value="' . _SKINFILES_DELETE_ALL . '" tabindex="140" onclick="return checkSubmit();" /></p>';
                                echo '</form>';
                if (is_writable($directory)) {
                        echo '<div class="dialogbox">';
                        echo '<h4 class="light">' . _SKINFILES_CREATE_NEW_DIR . '</h4><div>';
-                       echo '<form method="post" action="' . i18n::hsc($pluginUrl) . '">';
+                       echo '<form method="post" action="' . ENTITY::hsc($pluginUrl) . '">';
                        $manager->addTicketHidden();
                        echo '<input type="hidden" name="action" value="createdir" />';
-                       echo '<input type="hidden" name="dir" value="' . i18n::hsc($relative) . '" />';
+                       echo '<input type="hidden" name="dir" value="' . ENTITY::hsc($relative) . '" />';
                        echo '<input type="text" name="name" value="untitled" tabindex="90" size="40" />';
                        echo '<p class="buttons"><input type="submit" value="' . _SKINFILES_CREATE . '" tabindex="140" onclick="return checkSubmit();" /></p>';
                        echo '</form>';
                        $editUrl  = $manager->addTicketToUrl($pluginUrl . '?action=rendir&dir=' . rawurlencode($relative . $file));
 
                        echo '<p class="location">' . _SKINFILES_CURRENT_LOCATION . sfDisplayPath($relative);
-                       echo '<a href="' . i18n::hsc($editUrl) . '" title="' . _SKINFILES_RENAME . ' &laquo;' . $file . '&raquo;">';
+                       echo '<a href="' . ENTITY::hsc($editUrl) . '" title="' . _SKINFILES_RENAME . ' &laquo;' . $file . '&raquo;">';
                        echo '<img src="' . $pluginUrl . 'dir.gif' . '" alt="" /> ' . $file . '</a></p>';
 
                        echo '<div class="dialogbox">';
-                       echo '<form method="post" action="' . i18n::hsc($pluginUrl) . '">';
+                       echo '<form method="post" action="' . ENTITY::hsc($pluginUrl) . '">';
                        $manager->addTicketHidden();
                        echo '<input type="hidden" name="action" value="rendir_process" />';
-                       echo '<input type="hidden" name="dir" value="' . i18n::hsc($relative . $file) . '" />';
+                       echo '<input type="hidden" name="dir" value="' . ENTITY::hsc($relative . $file) . '" />';
 
-                       echo '<h4>' . _SKINFILES_RENAME_DIR_MSG . ' &laquo;' . i18n::hsc($file) . '&raquo; ' . _SKINFILES_RENAME_DIR_MSG2 . '</h4><div>';
-                       echo '<p><input type="text" name="name" size="40" value="' . i18n::hsc($preset != '' ? $preset : $file) . '" /></p>';
+                       echo '<h4>' . _SKINFILES_RENAME_DIR_MSG . ' &laquo;' . ENTITY::hsc($file) . '&raquo; ' . _SKINFILES_RENAME_DIR_MSG2 . '</h4><div>';
+                       echo '<p><input type="text" name="name" size="40" value="' . ENTITY::hsc($preset != '' ? $preset : $file) . '" /></p>';
                        echo '<p class="buttons">';
                        echo '<input type="hidden" name="sure" value="yes" />';
                        echo '<input type="submit" value="' . _SKINFILES_RENAME . '" />';
                }
                else
                {
-                       echo "<p class='error'>" . _SKINFILES_ERR_DIR_DOES_NOT_EXIST1 . " &laquo;" . i18n::hsc($file) . "&raquo; " . _SKINFILES_ERR_DIR_DOES_NOT_EXIST2;
+                       echo "<p class='error'>" . _SKINFILES_ERR_DIR_DOES_NOT_EXIST1 . " &laquo;" . ENTITY::hsc($file) . "&raquo; " . _SKINFILES_ERR_DIR_DOES_NOT_EXIST2;
                        echo _SKINFILES_ERR_DIR_DOES_NOT_EXIST3 . "</p>";
                }
        }
                                $name = requestVar('name');
                                
                                if ($name == '') {
-                                       echo "<p class='error'>" . _SKINFILES_ERR_COULD_NOT_RENAME_DIR1 . "&laquo;" . i18n::hsc($file) . "&raquo; ";
+                                       echo "<p class='error'>" . _SKINFILES_ERR_COULD_NOT_RENAME_DIR1 . "&laquo;" . ENTITY::hsc($file) . "&raquo; ";
                                        echo _SKINFILES_ERR_COULD_NOT_RENAME_DIR2 . "</p>";
                                        _skinfiles_rendir($name);
                                        return;
                                }
                                
                                if (sfIllegalFilename($name)) {
-                                       echo "<p class='error'>" . _SKINFILES_ERR_COULD_NOT_RENAME_DIR3 . "&laquo;" . i18n::hsc($file) . "&raquo; ";
+                                       echo "<p class='error'>" . _SKINFILES_ERR_COULD_NOT_RENAME_DIR3 . "&laquo;" . ENTITY::hsc($file) . "&raquo; ";
                                        echo _SKINFILES_ERR_COULD_NOT_RENAME_DIR4 . "</p>";
                                        _skinfiles_rendir($name);
                                        return;
                                } 
                                
                                if ($name == $file) {
-                                       echo "<p class='error'>" . _SKINFILES_ERR_COULD_NOT_RENAME_DIR5 . "&laquo;" . i18n::hsc($file) . "&raquo; ";
+                                       echo "<p class='error'>" . _SKINFILES_ERR_COULD_NOT_RENAME_DIR5 . "&laquo;" . ENTITY::hsc($file) . "&raquo; ";
                                        echo _SKINFILES_ERR_COULD_NOT_RENAME_DIR6 . _SKINFILES_ERR_COULD_NOT_RENAME_DIR7 . "</p>";
                                        _skinfiles_rendir($name);
                                        return;
                                }
                                
                                if (file_exists($directory . $name)) {
-                                       echo "<p class='error'>" . _SKINFILES_ERR_COULD_NOT_RENAME_DIR8 . "&laquo;" . i18n::hsc($file) . "&raquo; ";
+                                       echo "<p class='error'>" . _SKINFILES_ERR_COULD_NOT_RENAME_DIR8 . "&laquo;" . ENTITY::hsc($file) . "&raquo; ";
                                        echo _SKINFILES_ERR_COULD_NOT_RENAME_DIR9 . _SKINFILES_ERR_COULD_NOT_RENAME_DIR10 . "</p>";
                                        _skinfiles_rendir($name);
                                        return;
                                
                                if (!@rename($directory . $file, $directory . $name)) 
                                {
-                                       echo "<p class='error'>" . _SKINFILES_ERR_COULD_NOT_RENAME_DIR11 . "&laquo;" . i18n::hsc($file) . "&raquo;</p>";
+                                       echo "<p class='error'>" . _SKINFILES_ERR_COULD_NOT_RENAME_DIR11 . "&laquo;" . ENTITY::hsc($file) . "&raquo;</p>";
                                        _skinfiles_rendir($name);
                                        return;
                                }
        
-                               echo "<p class='message'>" . _SKINFILES_RENAMED_DIR1 . "&laquo;" . i18n::hsc($file) . "&raquo; " . _SKINFILES_RENAMED_DIR2;
-                               echo _SKINFILES_RENAMED_DIR3 . "&laquo;" . i18n::hsc($name) . "&raquo;" . _SKINFILES_RENAMED_DIR4 . "</p>";
+                               echo "<p class='message'>" . _SKINFILES_RENAMED_DIR1 . "&laquo;" . ENTITY::hsc($file) . "&raquo; " . _SKINFILES_RENAMED_DIR2;
+                               echo _SKINFILES_RENAMED_DIR3 . "&laquo;" . ENTITY::hsc($name) . "&raquo;" . _SKINFILES_RENAMED_DIR4 . "</p>";
                                sfShowDirectory($directory);
                        }               
                        else
                        {
-                               echo "<p class='error'>" . _SKINFILES_ERR_DIR_DOES_NOT_EXIST1 . "&laquo;" . i18n::hsc($file) . "&raquo; " . _SKINFILES_ERR_DIR_DOES_NOT_EXIST2;
+                               echo "<p class='error'>" . _SKINFILES_ERR_DIR_DOES_NOT_EXIST1 . "&laquo;" . ENTITY::hsc($file) . "&raquo; " . _SKINFILES_ERR_DIR_DOES_NOT_EXIST2;
                                echo _SKINFILES_ERR_DIR_DOES_NOT_EXIST3 . "</p>";
                        }
                }
                        }
                        
                        if (sfIllegalFilename($name)) {
-                               echo "<p class='error'>" . _SKINFILES_ERR_COULD_NOT_CREATE_DIR2 . "&laquo;" . i18n::hsc($name) . "&raquo; ";
+                               echo "<p class='error'>" . _SKINFILES_ERR_COULD_NOT_CREATE_DIR2 . "&laquo;" . ENTITY::hsc($name) . "&raquo; ";
                                echo _SKINFILES_ERR_COULD_NOT_CREATE_DIR3 . "</p>";
                                sfShowDirectory($directory);
                                return;
                        } 
                        
                        if (file_exists($directory . $name)) {
-                               echo "<p class='error'>" . _SKINFILES_ERR_COULD_NOT_CREATE_DIR4 . "&laquo;" . i18n::hsc($name) . "&raquo; ";
+                               echo "<p class='error'>" . _SKINFILES_ERR_COULD_NOT_CREATE_DIR4 . "&laquo;" . ENTITY::hsc($name) . "&raquo; ";
                                echo _SKINFILES_ERR_COULD_NOT_CREATE_DIR5 . _SKINFILES_ERR_COULD_NOT_CREATE_DIR6 . "</p>";
                                sfShowDirectory($directory);
                                return;
 
                        if (!@mkdir($directory . $name, 0755)) 
                        {
-                               echo "<p class='error'>" . _SKINFILES_ERR_COULD_NOT_CREATE_DIR2 . "&laquo;" . i18n::hsc($name) . "&raquo;</p>";
+                               echo "<p class='error'>" . _SKINFILES_ERR_COULD_NOT_CREATE_DIR2 . "&laquo;" . ENTITY::hsc($name) . "&raquo;</p>";
                                sfShowDirectory($directory);
                                return;
                        }
 
                        @umask($mask);
                        
-                       echo "<p class='message'>" . _SKINFILES_ERR_COULD_NOT_CREATE_DIR7 . "&laquo;" . i18n::hsc($name) . "&raquo; " . _SKINFILES_ERR_COULD_NOT_CREATE_DIR8 . "</p>";
+                       echo "<p class='message'>" . _SKINFILES_ERR_COULD_NOT_CREATE_DIR7 . "&laquo;" . ENTITY::hsc($name) . "&raquo; " . _SKINFILES_ERR_COULD_NOT_CREATE_DIR8 . "</p>";
                        sfShowDirectory($directory);
                }               
                else
                {
-                       echo "<p class='error'>" . _SKINFILES_ERR_COULD_NOT_CREATE_DIR9 . "&laquo;" . i18n::hsc(basename($directory)) . "&raquo; " .  _SKINFILES_ERR_COULD_NOT_CREATE_DIR10;
+                       echo "<p class='error'>" . _SKINFILES_ERR_COULD_NOT_CREATE_DIR9 . "&laquo;" . ENTITY::hsc(basename($directory)) . "&raquo; " .  _SKINFILES_ERR_COULD_NOT_CREATE_DIR10;
                        echo _SKINFILES_ERR_COULD_NOT_CREATE_DIR11 . "</p>";
                }
        }
                        $delUrl  = $manager->addTicketToUrl($pluginUrl . '?action=deldir&dir=' . rawurlencode($relative . $file));
 
                        echo '<p class="location">' . _SKINFILES_CURRENT_LOCATION . sfDisplayPath($relative);
-                       echo '<a href="' . i18n::hsc($delUrl) . '" title="' . _SKINFILES_DELETE . ' &laquo;' . $file . '&raquo;">';
+                       echo '<a href="' . ENTITY::hsc($delUrl) . '" title="' . _SKINFILES_DELETE . ' &laquo;' . $file . '&raquo;">';
                        echo '<img src="' . $pluginUrl . 'dir.gif' . '" alt="" /> ' . $file . '</a></p>';
 
                        echo '<div class="dialogbox">';
-                       echo '<form method="post" action="' . i18n::hsc($pluginUrl) . '">';
+                       echo '<form method="post" action="' . ENTITY::hsc($pluginUrl) . '">';
                        $manager->addTicketHidden();
                        echo '<input type="hidden" name="action" value="deldir_process" />';
-                       echo '<input type="hidden" name="dir" value="' . i18n::hsc($relative . $file) . '" />';
+                       echo '<input type="hidden" name="dir" value="' . ENTITY::hsc($relative . $file) . '" />';
 
-                       echo '<h4>' . _SKINFILES_DELETE_DIR . ' &laquo;' . i18n::hsc($file) . '&raquo; ' . _SKINFILES_DELETE_DIR2 . '</h4><div>';
+                       echo '<h4>' . _SKINFILES_DELETE_DIR . ' &laquo;' . ENTITY::hsc($file) . '&raquo; ' . _SKINFILES_DELETE_DIR2 . '</h4><div>';
                        echo '<p class="buttons">';
                        echo '<input type="hidden" name="sure" value="yes" />';
                        echo '<input type="submit" value="' . _SKINFILES_DELETE . '" />';
                }
                else
                {
-                       echo "<p class='error'>" . _SKINFILES_ERR_DELETE_DIR1 . " &laquo;" . i18n::hsc($file) . "&raquo; " . _SKINFILES_ERR_DELETE_DIR2;
+                       echo "<p class='error'>" . _SKINFILES_ERR_DELETE_DIR1 . " &laquo;" . ENTITY::hsc($file) . "&raquo; " . _SKINFILES_ERR_DELETE_DIR2;
                        echo _SKINFILES_ERR_DELETE_DIR3 . "</p>";
                }
        }
                        {
                                if (!@rmdir($directory . $file)) 
                                {
-                                       echo "<p class='error'>" . _SKINFILES_ERR_DELETE_DIR4 . "&laquo;" . i18n::hsc($file) . "&raquo;</p>";
+                                       echo "<p class='error'>" . _SKINFILES_ERR_DELETE_DIR4 . "&laquo;" . ENTITY::hsc($file) . "&raquo;</p>";
                                        sfShowDirectory($directory);
                                        return;
                                }
        
-                               echo "<p class='message'>" . _SKINFILES_ERR_DELETE_DIR5 . "&laquo;" . i18n::hsc($file) . "&raquo; " . _SKINFILES_ERR_DELETE_DIR6 . "</p>";
+                               echo "<p class='message'>" . _SKINFILES_ERR_DELETE_DIR5 . "&laquo;" . ENTITY::hsc($file) . "&raquo; " . _SKINFILES_ERR_DELETE_DIR6 . "</p>";
                                sfShowDirectory($directory);
                        }               
                        else
                        {
-                               echo "<p class='error'>" . _SKINFILES_ERR_DELETE_DIR1 . "&laquo;" . i18n::hsc($file) . "&raquo; " . _SKINFILES_ERR_DELETE_DIR2;
+                               echo "<p class='error'>" . _SKINFILES_ERR_DELETE_DIR1 . "&laquo;" . ENTITY::hsc($file) . "&raquo; " . _SKINFILES_ERR_DELETE_DIR2;
                                echo _SKINFILES_ERR_DELETE_DIR3 . "</p>";
                        }
                }
                        $emptyUrl  = $manager->addTicketToUrl($pluginUrl . '?action=emptydir&dir=' . rawurlencode($relative . $file));
 
                        echo '<p class="location">' . _SKINFILES_CURRENT_LOCATION . sfDisplayPath($relative);
-                       echo '<a href="' . i18n::hsc($emptyUrl) . '" title="Empty &laquo;' . $file . '&raquo;">';
+                       echo '<a href="' . ENTITY::hsc($emptyUrl) . '" title="Empty &laquo;' . $file . '&raquo;">';
                        echo '<img src="' . $pluginUrl . 'dir.gif' . '" alt="" /> ' . $file . '</a></p>';
 
                        echo '<div class="dialogbox">';
-                       echo '<form method="post" action="' . i18n::hsc($pluginUrl) . '">';
+                       echo '<form method="post" action="' . ENTITY::hsc($pluginUrl) . '">';
                        $manager->addTicketHidden();
                        echo '<input type="hidden" name="action" value="emptydir_process" />';
-                       echo '<input type="hidden" name="dir" value="' . i18n::hsc($relative . $file) . '" />';
+                       echo '<input type="hidden" name="dir" value="' . ENTITY::hsc($relative . $file) . '" />';
 
-                       echo '<h4>' . _SKINFILES_DELETE_FILE_MSG . ' &laquo;' . i18n::hsc($file) . '&raquo;' . _SKINFILES_DELETE_FILE_MSG2 . '</h4><div>';
+                       echo '<h4>' . _SKINFILES_DELETE_FILE_MSG . ' &laquo;' . ENTITY::hsc($file) . '&raquo;' . _SKINFILES_DELETE_FILE_MSG2 . '</h4><div>';
                        
                        if (count($files)) 
                        {
                                echo '<ul>';
-                               foreach ($files as $name) {     echo '<li>' . i18n::hsc($name) . '</li>'; }
+                               foreach ($files as $name) {     echo '<li>' . ENTITY::hsc($name) . '</li>'; }
                                echo '</ul>';
        
                                echo '<p class="buttons">';
                }
                else
                {
-                       echo "<p class='error'>" . _SKINFILES_ERR_DELETE_DIR1 . "&laquo;" . i18n::hsc($file) . "&raquo; " . _SKINFILES_ERR_DELETE_DIR2;
+                       echo "<p class='error'>" . _SKINFILES_ERR_DELETE_DIR1 . "&laquo;" . ENTITY::hsc($file) . "&raquo; " . _SKINFILES_ERR_DELETE_DIR2;
                        echo _SKINFILES_ERR_DELETE_DIR3 . "</p>";
                }
        }
                                                   is_writable($directory . $file . '/' . $name)) 
                                                {
                                                        if (unlink ($directory .$file . '/' . $name)) 
-                                                               echo "<p class='message'>" . _SKINFILES_ERR_EMPTY_DIR1 . "&laquo;" . i18n::hsc($name) . "&raquo; " . _SKINFILES_ERR_EMPTY_DIR2 . "</p>";
+                                                               echo "<p class='message'>" . _SKINFILES_ERR_EMPTY_DIR1 . "&laquo;" . ENTITY::hsc($name) . "&raquo; " . _SKINFILES_ERR_EMPTY_DIR2 . "</p>";
                                                        else
-                                                               echo "<p class='error'>" . _SKINFILES_ERR_EMPTY_DIR3 . "&laquo;" . i18n::hsc($name) . "&raquo; " . _SKINFILES_ERR_EMPTY_DIR4 . "</p>";
+                                                               echo "<p class='error'>" . _SKINFILES_ERR_EMPTY_DIR3 . "&laquo;" . ENTITY::hsc($name) . "&raquo; " . _SKINFILES_ERR_EMPTY_DIR4 . "</p>";
                                                }
                                        }
                                        
                        }
                        else
                        {
-                               echo "<p class='error'>" . _SKINFILES_ERR_EMPTY_DIR5 . "&laquo;" . i18n::hsc($file) . "&raquo; " . _SKINFILES_ERR_EMPTY_DIR6;
+                               echo "<p class='error'>" . _SKINFILES_ERR_EMPTY_DIR5 . "&laquo;" . ENTITY::hsc($file) . "&raquo; " . _SKINFILES_ERR_EMPTY_DIR6;
                                echo _SKINFILES_ERR_EMPTY_DIR7 . "</p>";
                        }
                }
                        $viewUrl  = $manager->addTicketToUrl($pluginUrl . '?action=viewfile&file=' . rawurlencode(sfRelativePath($directory . $file)));
 
                        echo '<p class="location">' . _SKINFILES_CURRENT_LOCATION . sfDisplayPath($relative);
-                       echo '<a href="' . i18n::hsc($viewUrl) . '" title="View &laquo;' . $file . '&raquo;">';
-                       echo '<img src="' . i18n::hsc(sfIcon($file)) . '" alt="" /> ' . $file . '</a></p>';
+                       echo '<a href="' . ENTITY::hsc($viewUrl) . '" title="View &laquo;' . $file . '&raquo;">';
+                       echo '<img src="' . ENTITY::hsc(sfIcon($file)) . '" alt="" /> ' . $file . '</a></p>';
 
-                       echo '<h4>' . _SKINFILES_VIEW_FILE . '&laquo;' . i18n::hsc($file) . '&raquo;</h4>';
+                       echo '<h4>' . _SKINFILES_VIEW_FILE . '&laquo;' . ENTITY::hsc($file) . '&raquo;</h4>';
 
                        if (sfIsFileType('html', $file))
                        {
                                $content = implode('', file($directory . $file));
 
                                echo '<pre>';
-                               echo i18n::hsc($content);
+                               echo ENTITY::hsc($content);
                                echo '</pre>';
                        }
 
                                
                                echo '<table>';
                                echo '<tr><th colspan="2">' . _SKINFILES_VIEW_FILE_IMG_INFO . '</th></tr>';
-                               echo '<tr><td>' . _SKINFILES_VIEW_FILE_TYPE . '</td><td>' . i18n::hsc($type) . '</td></tr>';
-                               echo '<tr><td>' . _SKINFILES_VIEW_FILE_WIDTH . '</td><td>' . i18n::hsc($size[0]) . _SKINFILES_VIEW_FILE_PX . '</td></tr>';
-                               echo '<tr><td>' . _SKINFILES_VIEW_FILE_HEIGHT . '</td><td>' . i18n::hsc($size[1]) . _SKINFILES_VIEW_FILE_PX . '</td></tr>';     
+                               echo '<tr><td>' . _SKINFILES_VIEW_FILE_TYPE . '</td><td>' . ENTITY::hsc($type) . '</td></tr>';
+                               echo '<tr><td>' . _SKINFILES_VIEW_FILE_WIDTH . '</td><td>' . ENTITY::hsc($size[0]) . _SKINFILES_VIEW_FILE_PX . '</td></tr>';
+                               echo '<tr><td>' . _SKINFILES_VIEW_FILE_HEIGHT . '</td><td>' . ENTITY::hsc($size[1]) . _SKINFILES_VIEW_FILE_PX . '</td></tr>';   
                                
                                if (isset($size['channels']) || isset($size['bits'])) 
                                {
                                        $channels = isset($size['channels']) ? $size['channels'] : 3;
                                        $depth    = $size[2] == IMAGETYPE_GIF ? $size['bits'] : $size['bits'] * $channels;
-                                       echo '<tr><td>' . _SKINFILES_VIEW_FILE_CHANNELS . '</td><td>' . i18n::hsc($channels) . '</td></tr>';
-                                       echo '<tr><td>' . _SKINFILES_VIEW_FILE_COLOR_DEPTH . '</td><td>' . i18n::hsc($depth) . _SKINFILES_VIEW_FILE_BITS . '</td></tr>';
-                                       echo '<tr><td>' . _SKINFILES_VIEW_FILE_COLORS . '</td><td>' . i18n::hsc(pow(2, $depth)) . _SKINFILES_VIEW_FILE_COLORS2 . '</td></tr>';
+                                       echo '<tr><td>' . _SKINFILES_VIEW_FILE_CHANNELS . '</td><td>' . ENTITY::hsc($channels) . '</td></tr>';
+                                       echo '<tr><td>' . _SKINFILES_VIEW_FILE_COLOR_DEPTH . '</td><td>' . ENTITY::hsc($depth) . _SKINFILES_VIEW_FILE_BITS . '</td></tr>';
+                                       echo '<tr><td>' . _SKINFILES_VIEW_FILE_COLORS . '</td><td>' . ENTITY::hsc(pow(2, $depth)) . _SKINFILES_VIEW_FILE_COLORS2 . '</td></tr>';
                                }
 
                                
                                                echo '<tr><th colspan="2">Exif information</th></tr>';
                                                
                                                if (isset($exif['Make']) && isset($exif['Model']))
-                                                       echo '<tr><td>Camera:</td><td>' . i18n::hsc($exif['Make'] . ' ' . $exif['Model']) . '</td></tr>';
+                                                       echo '<tr><td>Camera:</td><td>' . ENTITY::hsc($exif['Make'] . ' ' . $exif['Model']) . '</td></tr>';
                                                
                                                if (isset($exif['DateTime']))
-                                                       echo '<tr><td>Created on:</td><td>' . i18n::hsc($exif['DateTime']) . '</td></tr>';
+                                                       echo '<tr><td>Created on:</td><td>' . ENTITY::hsc($exif['DateTime']) . '</td></tr>';
                                                
                                                if (isset($exif['XResolution']))
-                                                       echo '<tr><td>Horizontal resolution:</td><td>' . i18n::hsc(_skinfiles_exif_prepare($exif['XResolution'])) . ' dpi</td></tr>';
+                                                       echo '<tr><td>Horizontal resolution:</td><td>' . ENTITY::hsc(_skinfiles_exif_prepare($exif['XResolution'])) . ' dpi</td></tr>';
                                                
                                                if (isset($exif['YResolution']))
-                                                       echo '<tr><td>Vertical resolution:</td><td>' . i18n::hsc(_skinfiles_exif_prepare($exif['YResolution'])) . ' dpi</td></tr>';
+                                                       echo '<tr><td>Vertical resolution:</td><td>' . ENTITY::hsc(_skinfiles_exif_prepare($exif['YResolution'])) . ' dpi</td></tr>';
                                                
                                                if (isset($exif['FocalLength']))
-                                                       echo '<tr><td>Focal length:</td><td>' . i18n::hsc(_skinfiles_exif_prepare($exif['FocalLength'])) . ' mm</td></tr>';
+                                                       echo '<tr><td>Focal length:</td><td>' . ENTITY::hsc(_skinfiles_exif_prepare($exif['FocalLength'])) . ' mm</td></tr>';
                                                
                                                if (isset($exif['FNumber']))
-                                                       echo '<tr><td>F-number:</td><td>F/' . i18n::hsc(_skinfiles_exif_prepare($exif['FNumber'])) . '</td></tr>';
+                                                       echo '<tr><td>F-number:</td><td>F/' . ENTITY::hsc(_skinfiles_exif_prepare($exif['FNumber'])) . '</td></tr>';
                                                
                                                if (isset($exif['ExposureTime']))
-                                                       echo '<tr><td>Exposuretime:</td><td>' . i18n::hsc(_skinfiles_exif_prepare($exif['ExposureTime'])) . ' sec</td></tr>';
+                                                       echo '<tr><td>Exposuretime:</td><td>' . ENTITY::hsc(_skinfiles_exif_prepare($exif['ExposureTime'])) . ' sec</td></tr>';
                                                
                                                if (isset($exif['ISOSpeedRatings']))
-                                                       echo '<tr><td>ISO-speed:</td><td>' . i18n::hsc(_skinfiles_exif_prepare($exif['ISOSpeedRatings'])) . '</td></tr>';
+                                                       echo '<tr><td>ISO-speed:</td><td>' . ENTITY::hsc(_skinfiles_exif_prepare($exif['ISOSpeedRatings'])) . '</td></tr>';
                                        }
                                }
 
                }
                else
                {
-                       echo "<p class='error'>" . _SKINFILES_ERR_VIEW_FILE1 . "&laquo;" . i18n::hsc($file) . "&raquo; " . _SKINFILES_ERR_VIEW_FILE2;
+                       echo "<p class='error'>" . _SKINFILES_ERR_VIEW_FILE1 . "&laquo;" . ENTITY::hsc($file) . "&raquo; " . _SKINFILES_ERR_VIEW_FILE2;
                        echo _SKINFILES_ERR_VIEW_FILE3 . "</p>";
                }
        }
                        $editUrl  = $manager->addTicketToUrl($pluginUrl . '?action=editfile&file=' . rawurlencode(sfRelativePath($directory . $file)));
 
                        echo '<p class="location">' . _SKINFILES_CURRENT_LOCATION . sfDisplayPath($relative);
-                       echo '<a href="' . i18n::hsc($editUrl) . '" title="Edit &laquo;' . $file . '&raquo;">';
-                       echo '<img src="' . i18n::hsc(sfIcon($file)) . '" alt="" /> ' . $file . '</a></p>';
+                       echo '<a href="' . ENTITY::hsc($editUrl) . '" title="Edit &laquo;' . $file . '&raquo;">';
+                       echo '<img src="' . ENTITY::hsc(sfIcon($file)) . '" alt="" /> ' . $file . '</a></p>';
 
                        $content = implode('', file($directory . $file));
 
                        echo '<div class="dialogbox">';
-                       echo '<form method="post" action="' . i18n::hsc($pluginUrl) . '">';
+                       echo '<form method="post" action="' . ENTITY::hsc($pluginUrl) . '">';
                        $manager->addTicketHidden();
                        echo '<input type="hidden" name="action" value="editfile_process" />';
-                       echo '<input type="hidden" name="file" value="' . i18n::hsc(sfRelativePath($directory . $file)) . '" />';
+                       echo '<input type="hidden" name="file" value="' . ENTITY::hsc(sfRelativePath($directory . $file)) . '" />';
 
-                       echo '<h4>' . _SKINFILES_EDIT_FILE_MSG . ' &laquo;' . i18n::hsc($file) . '&raquo;</h4><div>';
+                       echo '<h4>' . _SKINFILES_EDIT_FILE_MSG . ' &laquo;' . ENTITY::hsc($file) . '&raquo;</h4><div>';
                        echo '<p><textarea class="skinedit" tabindex="8" rows="20" cols="80" name="content">';
-                       echo i18n::hsc($content);
+                       echo ENTITY::hsc($content);
                        echo '</textarea></p>';
                        
                        echo '<p class="buttons">';
                }
                else
                {
-                       echo "<p class='error'>" . _SKINFILES_ERR_EDIT_FILE1 . "&laquo;" . i18n::hsc($file) . "&raquo; " . _SKINFILES_ERR_EDIT_FILE2;
+                       echo "<p class='error'>" . _SKINFILES_ERR_EDIT_FILE1 . "&laquo;" . ENTITY::hsc($file) . "&raquo; " . _SKINFILES_ERR_EDIT_FILE2;
                        echo _SKINFILES_ERR_EDIT_FILE3 . "</p>";
                }
        }
                                }
                                
                                if ($success)
-                                       echo "<p class='message'>" . _SKINFILES_ERR_EDIT_FILE4 . "&laquo;" . i18n::hsc($file) . "&raquo; " . _SKINFILES_ERR_EDIT_FILE5 . "</p>";
+                                       echo "<p class='message'>" . _SKINFILES_ERR_EDIT_FILE4 . "&laquo;" . ENTITY::hsc($file) . "&raquo; " . _SKINFILES_ERR_EDIT_FILE5 . "</p>";
                                else
-                                       echo "<p class='error'>" . _SKINFILES_ERR_EDIT_FILE6 . "&laquo;" . i18n::hsc($file) . "&raquo; " . _SKINFILES_ERR_EDIT_FILE7 . "</p>";
+                                       echo "<p class='error'>" . _SKINFILES_ERR_EDIT_FILE6 . "&laquo;" . ENTITY::hsc($file) . "&raquo; " . _SKINFILES_ERR_EDIT_FILE7 . "</p>";
                        
                                _skinfiles_editfile();
                        }
                        else
                        {
-                               echo "<p class='error'>" . _SKINFILES_ERR_EDIT_FILE1 . "&laquo;" . i18n::hsc($file) . "&raquo; " . _SKINFILES_ERR_EDIT_FILE2;
+                               echo "<p class='error'>" . _SKINFILES_ERR_EDIT_FILE1 . "&laquo;" . ENTITY::hsc($file) . "&raquo; " . _SKINFILES_ERR_EDIT_FILE2;
                                echo _SKINFILES_ERR_EDIT_FILE3 . "</p>";
                        }
                }
                        $editUrl  = $manager->addTicketToUrl($pluginUrl . '?action=renfile&file=' . rawurlencode(sfRelativePath($directory . $file)));
 
                        echo '<p class="location">' . _SKINFILES_CURRENT_LOCATION . sfDisplayPath($relative);
-                       echo '<a href="' . i18n::hsc($editUrl) . '" title="' . _SKINFILES_RENAME . ' &laquo;' . $file . '&raquo;">';
-                       echo '<img src="' . i18n::hsc(sfIcon($file)) . '" alt="" /> ' . $file . '</a></p>';
+                       echo '<a href="' . ENTITY::hsc($editUrl) . '" title="' . _SKINFILES_RENAME . ' &laquo;' . $file . '&raquo;">';
+                       echo '<img src="' . ENTITY::hsc(sfIcon($file)) . '" alt="" /> ' . $file . '</a></p>';
 
                        echo '<div class="dialogbox">';
-                       echo '<form method="post" action="' . i18n::hsc($pluginUrl) . '">';
+                       echo '<form method="post" action="' . ENTITY::hsc($pluginUrl) . '">';
                        $manager->addTicketHidden();
                        echo '<input type="hidden" name="action" value="renfile_process" />';
-                       echo '<input type="hidden" name="file" value="' . i18n::hsc(sfRelativePath($directory . $file)) . '" />';
+                       echo '<input type="hidden" name="file" value="' . ENTITY::hsc(sfRelativePath($directory . $file)) . '" />';
 
-                       echo '<h4>' . _SKINFILES_RENAME_FILE_MSG . '&laquo;' . i18n::hsc($file) . '&raquo; ' . _SKINFILES_RENAME_FILE_MSG2 . '</h4><div>';
-                       echo '<p><input type="text" name="name" size="40" value="' . i18n::hsc($preset != '' ? $preset : $file) . '" /></p>';
+                       echo '<h4>' . _SKINFILES_RENAME_FILE_MSG . '&laquo;' . ENTITY::hsc($file) . '&raquo; ' . _SKINFILES_RENAME_FILE_MSG2 . '</h4><div>';
+                       echo '<p><input type="text" name="name" size="40" value="' . ENTITY::hsc($preset != '' ? $preset : $file) . '" /></p>';
                        echo '<p class="buttons">';
                        echo '<input type="hidden" name="sure" value="yes" /">';
                        echo '<input type="submit" value="' . _SKINFILES_RENAME . '" />';
                }
                else
                {
-                       echo "<p class='error'>" . _SKINFILES_ERR_RENAME_FILE1 . "&laquo;" . i18n::hsc($file) . "&raquo; " . _SKINFILES_ERR_RENAME_FILE2;
+                       echo "<p class='error'>" . _SKINFILES_ERR_RENAME_FILE1 . "&laquo;" . ENTITY::hsc($file) . "&raquo; " . _SKINFILES_ERR_RENAME_FILE2;
                        echo _SKINFILES_ERR_RENAME_FILE3 . "</p>";
                }
        }
                                $name = requestVar('name');
 
                                if ($name == '') {
-                                       echo "<p class='error'>" . _SKINFILES_ERR_RENAME_FILE4 . "&laquo;" . i18n::hsc($file) . "&raquo; ";
+                                       echo "<p class='error'>" . _SKINFILES_ERR_RENAME_FILE4 . "&laquo;" . ENTITY::hsc($file) . "&raquo; ";
                                        echo _SKINFILES_ERR_RENAME_FILE5 . "</p>";
                                        _skinfiles_renfile($name);
                                        return;
                                }
                                
                                if (sfIllegalFilename($name)) {
-                                       echo "<p class='error'>" . _SKINFILES_ERR_RENAME_FILE6 . "&laquo;" . i18n::hsc($file) . "&raquo; ";
+                                       echo "<p class='error'>" . _SKINFILES_ERR_RENAME_FILE6 . "&laquo;" . ENTITY::hsc($file) . "&raquo; ";
                                        echo _SKINFILES_ERR_RENAME_FILE7 . "</p>";
                                        _skinfiles_renfile($name);
                                        return;
                                } 
                                
                                if ($name == $file) {
-                                       echo "<p class='error'>" . _SKINFILES_ERR_RENAME_FILE8 . "&laquo;" . i18n::hsc($file) . "&raquo; ";
+                                       echo "<p class='error'>" . _SKINFILES_ERR_RENAME_FILE8 . "&laquo;" . ENTITY::hsc($file) . "&raquo; ";
                                        echo _SKINFILES_ERR_RENAME_FILE9 . "</p>";
                                        _skinfiles_renfile($name);
                                        return;
                                }
                                
                                if (file_exists($directory . $name)) {
-                                       echo "<p class='error'>" . _SKINFILES_ERR_RENAME_FILE10 . "&laquo;" . i18n::hsc($file) . "&raquo; ";
+                                       echo "<p class='error'>" . _SKINFILES_ERR_RENAME_FILE10 . "&laquo;" . ENTITY::hsc($file) . "&raquo; ";
                                        echo _SKINFILES_ERR_RENAME_FILE11;
                                        echo _SKINFILES_ERR_RENAME_FILE12 . "</p>";
                                        _skinfiles_renfile($name);
 
                                if (!@rename($directory . $file, $directory . $name)) 
                                {
-                                       echo "<p class='error'>" . _SKINFILES_ERR_RENAME_FILE13 . "&laquo;" . i18n::hsc($file) . "&raquo; " . _SKINFILES_ERR_RENAME_FILE14 . "</p>";
+                                       echo "<p class='error'>" . _SKINFILES_ERR_RENAME_FILE13 . "&laquo;" . ENTITY::hsc($file) . "&raquo; " . _SKINFILES_ERR_RENAME_FILE14 . "</p>";
                                        _skinfiles_renfile($name);
                                        return;
                                }
        
-                               echo "<p class='message'>" . _SKINFILES_ERR_RENAME_FILE15 . "&laquo;" . i18n::hsc($file) . "&raquo; " . _SKINFILES_ERR_RENAME_FILE16;
-                               echo _SKINFILES_ERR_RENAME_FILE17 . "&laquo;" . i18n::hsc($name) . "&raquo;" . _SKINFILES_ERR_RENAME_FILE18 . "</p>";
+                               echo "<p class='message'>" . _SKINFILES_ERR_RENAME_FILE15 . "&laquo;" . ENTITY::hsc($file) . "&raquo; " . _SKINFILES_ERR_RENAME_FILE16;
+                               echo _SKINFILES_ERR_RENAME_FILE17 . "&laquo;" . ENTITY::hsc($name) . "&raquo;" . _SKINFILES_ERR_RENAME_FILE18 . "</p>";
                                sfShowDirectory($directory);
                        }               
                        else
                        {
-                               echo "<p class='error'>" . _SKINFILES_ERR_RENAME_FILE1 . "&laquo;" . i18n::hsc($file) . "&raquo; " . _SKINFILES_ERR_RENAME_FILE2;
+                               echo "<p class='error'>" . _SKINFILES_ERR_RENAME_FILE1 . "&laquo;" . ENTITY::hsc($file) . "&raquo; " . _SKINFILES_ERR_RENAME_FILE2;
                                echo _SKINFILES_ERR_RENAME_FILE3 . "</p>";
                        }
                }
                        }
                        
                        if (sfIllegalFilename($name)) {
-                               echo "<p class='error'>" . _SKINFILES_ERR_CREATE_FILE2 . "&laquo;" . i18n::hsc($name) . "&raquo; ";
+                               echo "<p class='error'>" . _SKINFILES_ERR_CREATE_FILE2 . "&laquo;" . ENTITY::hsc($name) . "&raquo; ";
                                echo _SKINFILES_ERR_CREATE_FILE3 . "</p>";
                                sfShowDirectory($directory);
                                return;
                        } 
                        
                        if (file_exists($directory . $name)) {
-                               echo "<p class='error'>" . _SKINFILES_ERR_CREATE_FILE4 . "&laquo;" . i18n::hsc($name) . "&raquo; ";
+                               echo "<p class='error'>" . _SKINFILES_ERR_CREATE_FILE4 . "&laquo;" . ENTITY::hsc($name) . "&raquo; ";
                                echo _SKINFILES_ERR_CREATE_FILE5;
                                echo _SKINFILES_ERR_CREATE_FILE6 . "</p>";
                                sfShowDirectory($directory);
                        
                        if (!@touch($directory . $name)) 
                        {
-                               echo "<p class='error'>" . _SKINFILES_ERR_CREATE_FILE7 . "&laquo;" . i18n::hsc($name) . "&raquo; " . _SKINFILES_ERR_CREATE_FILE8 . "</p>";
+                               echo "<p class='error'>" . _SKINFILES_ERR_CREATE_FILE7 . "&laquo;" . ENTITY::hsc($name) . "&raquo; " . _SKINFILES_ERR_CREATE_FILE8 . "</p>";
                                sfShowDirectory($directory);
                                return;
                        }
                        @chmod($directory . $name, 0755);
                        @umask($mask);
                        
-                       echo "<p class='message'>" . _SKINFILES_ERR_CREATE_FILE9 . "&laquo;" . i18n::hsc($name) . "&raquo; " . _SKINFILES_ERR_CREATE_FILE10 . "</p>";
+                       echo "<p class='message'>" . _SKINFILES_ERR_CREATE_FILE9 . "&laquo;" . ENTITY::hsc($name) . "&raquo; " . _SKINFILES_ERR_CREATE_FILE10 . "</p>";
                        sfShowDirectory($directory);
                }               
                else
                {
-                       echo "<p class='error'>" . _SKINFILES_ERR_CREATE_FILE11 . "&laquo;" . i18n::hsc(basename($directory)) . "&raquo; " . _SKINFILES_ERR_CREATE_FILE12;
+                       echo "<p class='error'>" . _SKINFILES_ERR_CREATE_FILE11 . "&laquo;" . ENTITY::hsc(basename($directory)) . "&raquo; " . _SKINFILES_ERR_CREATE_FILE12;
                        echo _SKINFILES_ERR_CREATE_FILE13 . "</p>";
                }
        }
                        $delUrl  = $manager->addTicketToUrl($pluginUrl . '?action=delfile&file=' . rawurlencode(sfRelativePath($directory . $file)));
 
                        echo '<p class="location">' . _SKINFILES_CURRENT_LOCATION . sfDisplayPath($relative);
-                       echo '<a href="' . i18n::hsc($delUrl) . '" title="' . _SKINFILES_DELETE . ' &laquo;' . $file . '&raquo;">';
-                       echo '<img src="' . i18n::hsc(sfIcon($file)) . '" alt="" /> ' . $file . '</a></p>';
+                       echo '<a href="' . ENTITY::hsc($delUrl) . '" title="' . _SKINFILES_DELETE . ' &laquo;' . $file . '&raquo;">';
+                       echo '<img src="' . ENTITY::hsc(sfIcon($file)) . '" alt="" /> ' . $file . '</a></p>';
 
                        echo '<div class="dialogbox">';
-                       echo '<form method="post" action="' . i18n::hsc($pluginUrl) . '">';
+                       echo '<form method="post" action="' . ENTITY::hsc($pluginUrl) . '">';
                        $manager->addTicketHidden();
                        echo '<input type="hidden" name="action" value="delfile_process" />';
-                       echo '<input type="hidden" name="file" value="' . i18n::hsc(sfRelativePath($directory . $file)) . '" />';
+                       echo '<input type="hidden" name="file" value="' . ENTITY::hsc(sfRelativePath($directory . $file)) . '" />';
 
-                       echo '<h4>' . _SKINFILES_DELETE_FILE . ' &laquo;' . i18n::hsc($file) . '&raquo; ' . _SKINFILES_DELETE_FILE2 . '</h4><div>';
+                       echo '<h4>' . _SKINFILES_DELETE_FILE . ' &laquo;' . ENTITY::hsc($file) . '&raquo; ' . _SKINFILES_DELETE_FILE2 . '</h4><div>';
                        echo '<p class="buttons">';
                        echo '<input type="hidden" name="sure" value="yes" />';
                        echo '<input type="submit" value="' . _SKINFILES_DELETE . '" />';
                }
                else
                {
-                       echo "<p class='error'>"  . _SKINFILES_ERR_DELETE_FILE1 . "&laquo;" . i18n::hsc($file) . "&raquo; " . _SKINFILES_ERR_DELETE_FILE2;
+                       echo "<p class='error'>"  . _SKINFILES_ERR_DELETE_FILE1 . "&laquo;" . ENTITY::hsc($file) . "&raquo; " . _SKINFILES_ERR_DELETE_FILE2;
                        echo _SKINFILES_ERR_DELETE_FILE3 . "</p>";
                }
        }
                        {
                                if (!@unlink($directory . $file)) 
                                {
-                                       echo "<p class='error'>" . _SKINFILES_ERR_DELETE_FILE4 . "&laquo;" . i18n::hsc($file) . "&raquo;</p>";
+                                       echo "<p class='error'>" . _SKINFILES_ERR_DELETE_FILE4 . "&laquo;" . ENTITY::hsc($file) . "&raquo;</p>";
                                        sfShowDirectory($directory);
                                        return;
                                }
        
-                               echo "<p class='message'>" . _SKINFILES_ERR_DELETE_FILE5 . "&laquo;" . i18n::hsc($file) . "&raquo; " . _SKINFILES_ERR_DELETE_FILE6 . "</p>";
+                               echo "<p class='message'>" . _SKINFILES_ERR_DELETE_FILE5 . "&laquo;" . ENTITY::hsc($file) . "&raquo; " . _SKINFILES_ERR_DELETE_FILE6 . "</p>";
                                sfShowDirectory($directory);
                        }               
                        else
                        {
-                               echo "<p class='error'>" . _SKINFILES_ERR_DELETE_FILE1 . "&laquo;" . i18n::hsc($file) . "&raquo; " . _SKINFILES_ERR_DELETE_FILE2;
+                               echo "<p class='error'>" . _SKINFILES_ERR_DELETE_FILE1 . "&laquo;" . ENTITY::hsc($file) . "&raquo; " . _SKINFILES_ERR_DELETE_FILE2;
                                echo _SKINFILES_ERR_DELETE_FILE3 . "</p>";
                        }
                }
                        $file = postFileInfo('name');
 
                        if ($file['size'] > $CONF['MaxUploadSize']) {
-                               echo "<p class='error'>" . _SKINFILES_ERR_UPLOAD_FILE1 . "&laquo;" . i18n::hsc($file['name']) . "&raquo; " . _SKINFILES_ERR_UPLOAD_FILE2 . _ERROR_FILE_TOO_BIG . "<br />";
+                               echo "<p class='error'>" . _SKINFILES_ERR_UPLOAD_FILE1 . "&laquo;" . ENTITY::hsc($file['name']) . "&raquo; " . _SKINFILES_ERR_UPLOAD_FILE2 . _ERROR_FILE_TOO_BIG . "<br />";
                                echo _SKINFILES_ERR_UPLOAD_FILE3 . $CONF['MaxUploadSize'] . " / ";
                                echo $file['size'] . " bytes</p>";
                                sfShowDirectory($directory);
                        }
 
                        if (!is_uploaded_file($file['tmp_name'])) {
-                               echo "<p class='error'>" . _SKINFILES_ERR_UPLOAD_FILE1 . "&laquo;" . i18n::hsc($file['name']) . "&raquo; " . _SKINFILES_ERR_UPLOAD_FILE2 . _ERROR_BADREQUEST .  _SKINFILES_ERR_UPLOAD_FILE4 . "</p>";
+                               echo "<p class='error'>" . _SKINFILES_ERR_UPLOAD_FILE1 . "&laquo;" . ENTITY::hsc($file['name']) . "&raquo; " . _SKINFILES_ERR_UPLOAD_FILE2 . _ERROR_BADREQUEST .  _SKINFILES_ERR_UPLOAD_FILE4 . "</p>";
                                sfShowDirectory($directory);
                                return;
                        }
                        
                        if (sfIllegalFilename($file['name'])) {
-                               echo "<p class='error'>" . _SKINFILES_ERR_UPLOAD_FILE5 . "&laquo;" . i18n::hsc($file['name']) . "&raquo; ";
+                               echo "<p class='error'>" . _SKINFILES_ERR_UPLOAD_FILE5 . "&laquo;" . ENTITY::hsc($file['name']) . "&raquo; ";
                                echo _SKINFILES_ERR_UPLOAD_FILE6 . "</p>";
                                sfShowDirectory($directory);
                                return;
                        }
                        
                        if (file_exists($directory . $file['name'])) {
-                               echo "<p class='error'>" . _SKINFILES_ERR_UPLOAD_FILE1 . "&laquo;" . i18n::hsc($file['name']) . "&raquo; " . _SKINFILES_ERR_UPLOAD_FILE2 . _ERROR_UPLOADDUPLICATE . "</p>";
+                               echo "<p class='error'>" . _SKINFILES_ERR_UPLOAD_FILE1 . "&laquo;" . ENTITY::hsc($file['name']) . "&raquo; " . _SKINFILES_ERR_UPLOAD_FILE2 . _ERROR_UPLOADDUPLICATE . "</p>";
                                sfShowDirectory($directory);
                                return;
                        }
 
                        if (!@move_uploaded_file($file['tmp_name'], $directory . $file['name'])) {
-                               echo "<p class='error'>" . _SKINFILES_ERR_UPLOAD_FILE1 . "&laquo;" . i18n::hsc($file['name']) . "&raquo; " . _SKINFILES_ERR_UPLOAD_FILE2 . _ERROR_UPLOADMOVEP . _SKINFILES_ERR_UPLOAD_FILE4 . "</p>";
+                               echo "<p class='error'>" . _SKINFILES_ERR_UPLOAD_FILE1 . "&laquo;" . ENTITY::hsc($file['name']) . "&raquo; " . _SKINFILES_ERR_UPLOAD_FILE2 . _ERROR_UPLOADMOVEP . _SKINFILES_ERR_UPLOAD_FILE4 . "</p>";
                                sfShowDirectory($directory);
                        }
 
                        @chmod($directory . $file['name'], 0755);
                        @umask($mask);
 
-                       echo "<p class='message'>" . _SKINFILES_ERR_UPLOAD_FILE7 . "&laquo;" . i18n::hsc($file['name']) . "&raquo; " . _SKINFILES_ERR_UPLOAD_FILE8 . "</p>";
+                       echo "<p class='message'>" . _SKINFILES_ERR_UPLOAD_FILE7 . "&laquo;" . ENTITY::hsc($file['name']) . "&raquo; " . _SKINFILES_ERR_UPLOAD_FILE8 . "</p>";
                        sfShowDirectory($directory);
                }
                else
                {
-                       echo "<p class='error'>" . _SKINFILES_ERR_UPLOAD_FILE9 . "&laquo;" . i18n::hsc(basename($directory)) . "&raquo; " . _SKINFILES_ERR_UPLOAD_FILE10;
+                       echo "<p class='error'>" . _SKINFILES_ERR_UPLOAD_FILE9 . "&laquo;" . ENTITY::hsc(basename($directory)) . "&raquo; " . _SKINFILES_ERR_UPLOAD_FILE10;
                        echo _SKINFILES_ERR_UPLOAD_FILE11 . "</p>";
                }       
        }
index eef55b7..26486c0 100644 (file)
@@ -59,8 +59,8 @@ if (!$CONF['DisableSite']) {
        ?>
        <rss version="2.0">
                <channel>
-                       <title><?php echo i18n::hsc($CONF['SiteName']); ?></title>
-                       <link><?php echo i18n::hsc($CONF['IndexURL']); ?></link>
+                       <title><?php echo ENTITY::hsc($CONF['SiteName']); ?></title>
+                       <link><?php echo ENTITY::hsc($CONF['IndexURL']); ?></link>
                        <description></description>
                        <docs>http://backend.userland.com/rss</docs>
                </channel>