Horde_Text:: -> Horde_Text_Filter_Space2html
authorMichael M Slusarz <slusarz@curecanti.org>
Thu, 11 Jun 2009 04:44:03 +0000 (22:44 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Thu, 11 Jun 2009 04:44:37 +0000 (22:44 -0600)
chora/browsedir.php
chora/cvsgraph.php
chora/diff.php
chora/history.php
chora/lib/Chora.php
chora/stats.php
imp/lib/IMP.php
imp/lib/UI/Mailbox.php
ingo/lib/Ingo.php

index 2160a2c..8fc860b 100644 (file)
@@ -84,7 +84,7 @@ if ($dirList) {
             continue;
         }
         $url = Chora::url('browsedir', $where . '/' . $currentDir . '/');
-        $currDir = Horde_Text::htmlAllSpaces($currentDir);
+        $currDir = Horde_Text_Filter::filter($currentDir, 'space2html', array('charset' => NLS::getCharset(), 'encode' => true, 'encode_all' => true));
         require CHORA_TEMPLATES . '/directory/dir.inc';
     }
     echo '</tbody>';
index bad9af3..3638749 100644 (file)
@@ -48,7 +48,7 @@ if (Horde_Util::getFormData('show_image')) {
     passthru($conf['paths']['cvsgraph'] . ' ' . $argstr . ' ' . $file);
 } else {
     // Display the wrapper page for the image.
-    $title = sprintf(_("Graph for %s"), Horde_Text::htmlAllSpaces($where));
+    $title = sprintf(_("Graph for %s"), Horde_Text_Filter::filter($where, 'space2html', array('charset' => NLS::getCharset(), 'encode' => true, 'encode_all' => true)));
     $extraLink = Chora::getFileViews($where, 'cvsgraph');
 
     require CHORA_TEMPLATES . '/common-header.inc';
index 71a7b28..12fb38a 100644 (file)
@@ -54,7 +54,7 @@ if ($type != 'colored') {
 $abbrev_r1 = $VC->abbrev($r1);
 $abbrev_r2 = $VC->abbrev($r2);
 $title = sprintf(_("Diff for %s between version %s and %s"),
-                 Horde_Text::htmlallspaces($where), $abbrev_r1, $abbrev_r2);
+                 Horde_Text_Filter::filter($where, 'space2html', array('charset' => NLS::getCharset(), 'encode' => true, 'encode_all' => true)), $abbrev_r1, $abbrev_r2);
 
 /* Format log entries. */
 $log_messages = array();
index deb529a..1571a03 100644 (file)
@@ -124,7 +124,7 @@ foreach ($grid as $cols) {
     $maxCol = max($val, $maxCol);
 }
 
-$title = sprintf(_("Source Branching View for %s"), Horde_Text::htmlallspaces($where));
+$title = sprintf(_("Source Branching View for %s"), Horde_Text_Filter::filter($where, 'space2html', array('charset' => NLS::getCharset(), 'encode' => true, 'encode_all' => true)));
 $extraLink = Chora::getFileViews($where, 'history');
 
 require CHORA_TEMPLATES . '/common-header.inc';
index fb0e1c9..a20ab24 100644 (file)
@@ -200,7 +200,7 @@ class Chora
             }
             $path .= $dir;
             if (!empty($dir)) {
-                $bar .= '/ <a href="' . self::url('browsedir', $path . ($i == $dir_count && !$GLOBALS['atdir'] ? '' : '/')) . '">'. Horde_Text::htmlallspaces($dir) . '</a> ';
+                $bar .= '/ <a href="' . self::url('browsedir', $path . ($i == $dir_count && !$GLOBALS['atdir'] ? '' : '/')) . '">'. Horde_Text_Filter::filter($dir, 'space2html', array('charset' => NLS::getCharset(), 'encode' => true, 'encode_all' => true)) . '</a> ';
             }
         }
 
@@ -610,7 +610,7 @@ class Chora
      */
     static public function formatLogMessage($log)
     {
-        $log = Text_Filter::filter($log, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO, 'charset' => NLS::getCharset(), 'class' => ''));
+        $log = Horde_Text_Filter::filter($log, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO, 'charset' => NLS::getCharset(), 'class' => ''));
 
         return (empty($GLOBALS['conf']['tickets']['regexp']) || empty($GLOBALS['conf']['tickets']['replacement']))
             ? $log
index 533744d..b2e4792 100644 (file)
@@ -28,7 +28,7 @@ foreach ($fl->queryLogs() as $lg) {
 }
 arsort($stats);
 
-$title = sprintf(_("Statistics for %s"), Horde_Text::htmlallspaces($where));
+$title = sprintf(_("Statistics for %s"), Horde_Text_Filter::filter($where, 'space2html', array('charset' => NLS::getCharset(), 'encode' => true, 'encode_all' => true)));
 Horde::addScriptFile('prototype.js', 'horde', true);
 Horde::addScriptFile('tables.js', 'horde', true);
 require CHORA_TEMPLATES . '/common-header.inc';
index aa4e389..9f2a370 100644 (file)
@@ -245,7 +245,7 @@ class IMP
             $val = isset($filter[$mbox['val']]) ? '' : htmlspecialchars($mbox['val']);
             $sel = ($mbox['val'] && !empty($options['selected']) && ($mbox['val'] === $options['selected'])) ? ' selected="selected"' : '';
             $label = empty($options['abbrev']) ? $mbox['label'] : $mbox['abbrev'];
-            $text .= sprintf('<option value="%s"%s>%s</option>%s', $val, $sel, Horde_Text::htmlSpaces($label), "\n");
+            $text .= sprintf('<option value="%s"%s>%s</option>%s', $val, $sel, Horde_Text_Filter::filter($label, 'space2html', array('charset' => NLS::getCharset(), 'encode' => true)), "\n");
         }
 
         /* Add the list of virtual folders to the list. */
@@ -255,7 +255,7 @@ class IMP
                 $vfolder_sel = $GLOBALS['imp_search']->searchMboxID();
                 $text .= '<option value="" disabled="disabled">- - - - - - - - -</option>' . "\n";
                 foreach ($vfolders as $id => $val) {
-                    $text .= sprintf('<option value="%s"%s>%s</option>%s', $GLOBALS['imp_search']->createSearchID($id), ($vfolder_sel == $id) ? ' selected="selected"' : '', Horde_Text::htmlSpaces($val), "\n");
+                    $text .= sprintf('<option value="%s"%s>%s</option>%s', $GLOBALS['imp_search']->createSearchID($id), ($vfolder_sel == $id) ? ' selected="selected"' : '', Horde_Text_Filter::filter($val, 'space2html', array('charset' => NLS::getCharset(), 'encode' => true)), "\n");
                 }
             }
         }
@@ -272,7 +272,7 @@ class IMP
                 foreach ($tasklists as $id => $tasklist) {
                     $text .= sprintf('<option value="%s">%s</option>%s',
                                      '_tasklist_' . $id,
-                                     Horde_Text::htmlSpaces($tasklist->get('name')),
+                                     Horde_Text_Filter::filter($tasklist->get('name'), 'space2html', array('charset' => NLS::getCharset(), 'encode' => true)),
                                      "\n");
                 }
             }
@@ -290,7 +290,7 @@ class IMP
                 foreach ($notepads as $id => $notepad) {
                     $text .= sprintf('<option value="%s">%s</option>%s',
                                      '_notepad_' . $id,
-                                     Horde_Text::htmlSpaces($notepad->get('name')),
+                                     Horde_Text_Filter::filter($notepad->get('name'), 'space2html', array('charset' => NLS::getCharset(), 'encode' => true)),
                                      "\n");
                 }
             }
index ae9b866..61c18bd 100644 (file)
@@ -233,7 +233,7 @@ class IMP_UI_Mailbox
      * Formats the subject header.
      *
      * @param string $subject     The MIME encoded subject header.
-     * @param string $htmlspaces  Run through Horde_Text::htmlSpaces()?
+     * @param string $htmlspaces  HTML-ize spaces?
      *
      * @return string  The formatted subject header.
      */
@@ -247,7 +247,7 @@ class IMP_UI_Mailbox
         $new_subject = $subject = IMP::filterText(preg_replace("/\s+/", ' ', $subject));
 
         if ($htmlspaces) {
-            $new_subject = Horde_Text::htmlSpaces($subject);
+            $new_subject = Horde_Text_Filter::filter($subject, 'space2html', array('charset' => NLS::getCharset(), 'encode' => true));
             if (empty($new_subject)) {
                 $new_subject = htmlspecialchars($subject);
             }
index b6dbbe7..a67a74c 100644 (file)
@@ -73,7 +73,7 @@ class Ingo
                     $label = $mbox['abbrev'];
                     $text .= sprintf('<option%s value="%s"%s>%s</option>%s',
                                      $disabled, $val, $sel,
-                                     Horde_Text::htmlSpaces($label), "\n");
+                                     Horde_Text_Filter::filter($label, 'space2html', array('charset' => NLS::getCharset(), 'encode' => true)), "\n");
                 }
 
                 $text .= '</select>';