From c38f2e8af33f2aad5309d90ba1743b729b6d80d7 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Wed, 10 Jun 2009 22:44:03 -0600 Subject: [PATCH] Horde_Text:: -> Horde_Text_Filter_Space2html --- chora/browsedir.php | 2 +- chora/cvsgraph.php | 2 +- chora/diff.php | 2 +- chora/history.php | 2 +- chora/lib/Chora.php | 4 ++-- chora/stats.php | 2 +- imp/lib/IMP.php | 8 ++++---- imp/lib/UI/Mailbox.php | 4 ++-- ingo/lib/Ingo.php | 2 +- 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/chora/browsedir.php b/chora/browsedir.php index 2160a2cd9..8fc860bcf 100644 --- a/chora/browsedir.php +++ b/chora/browsedir.php @@ -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 ''; diff --git a/chora/cvsgraph.php b/chora/cvsgraph.php index bad9af3cf..3638749c3 100644 --- a/chora/cvsgraph.php +++ b/chora/cvsgraph.php @@ -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'; diff --git a/chora/diff.php b/chora/diff.php index 71a7b281a..12fb38a02 100644 --- a/chora/diff.php +++ b/chora/diff.php @@ -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(); diff --git a/chora/history.php b/chora/history.php index deb529a6a..1571a037e 100644 --- a/chora/history.php +++ b/chora/history.php @@ -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'; diff --git a/chora/lib/Chora.php b/chora/lib/Chora.php index fb0e1c9b5..a20ab246b 100644 --- a/chora/lib/Chora.php +++ b/chora/lib/Chora.php @@ -200,7 +200,7 @@ class Chora } $path .= $dir; if (!empty($dir)) { - $bar .= '/ '. Horde_Text::htmlallspaces($dir) . ' '; + $bar .= '/ '. Horde_Text_Filter::filter($dir, 'space2html', array('charset' => NLS::getCharset(), 'encode' => true, 'encode_all' => true)) . ' '; } } @@ -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 diff --git a/chora/stats.php b/chora/stats.php index 533744d9d..b2e4792ae 100644 --- a/chora/stats.php +++ b/chora/stats.php @@ -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'; diff --git a/imp/lib/IMP.php b/imp/lib/IMP.php index aa4e38902..9f2a3702d 100644 --- a/imp/lib/IMP.php +++ b/imp/lib/IMP.php @@ -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('%s', $val, $sel, Horde_Text::htmlSpaces($label), "\n"); + $text .= sprintf('%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 .= '' . "\n"; foreach ($vfolders as $id => $val) { - $text .= sprintf('%s', $GLOBALS['imp_search']->createSearchID($id), ($vfolder_sel == $id) ? ' selected="selected"' : '', Horde_Text::htmlSpaces($val), "\n"); + $text .= sprintf('%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('%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('%s', '_notepad_' . $id, - Horde_Text::htmlSpaces($notepad->get('name')), + Horde_Text_Filter::filter($notepad->get('name'), 'space2html', array('charset' => NLS::getCharset(), 'encode' => true)), "\n"); } } diff --git a/imp/lib/UI/Mailbox.php b/imp/lib/UI/Mailbox.php index ae9b86641..61c18bdea 100644 --- a/imp/lib/UI/Mailbox.php +++ b/imp/lib/UI/Mailbox.php @@ -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); } diff --git a/ingo/lib/Ingo.php b/ingo/lib/Ingo.php index b6dbbe7ae..a67a74c58 100644 --- a/ingo/lib/Ingo.php +++ b/ingo/lib/Ingo.php @@ -73,7 +73,7 @@ class Ingo $label = $mbox['abbrev']; $text .= sprintf('%s%s', $disabled, $val, $sel, - Horde_Text::htmlSpaces($label), "\n"); + Horde_Text_Filter::filter($label, 'space2html', array('charset' => NLS::getCharset(), 'encode' => true)), "\n"); } $text .= ''; -- 2.11.0