<dir name="Horde">
<dir name="Text">
<dir name="Filter">
- <dir name="fixtures">
- <file name="html2text.html" role="test" />
- <file name="text2html.txt" role="test" />
- </dir> <!-- /test/Horde/Text/Filter/fixtures -->
<file name="AllTests.php" role="test" />
<file name="Autoload.php" role="test" />
+ <file name="Emails.php" role="test" />
+ <file name="EnvironmentTest.php" role="test" />
+ <file name="Html2textTest.php" role="test" />
+ <file name="Space2htmlTest.php" role="test" />
+ <file name="Text2htmlTest.php" role="test" />
<file name="XssTest.php" role="test" />
- <file name="emails.phpt" role="test" />
- <file name="environment.phpt" role="test" />
- <file name="html2text.phpt" role="test" />
- <file name="html2text2.phpt" role="test" />
<file name="phpunit.xml" role="test" />
- <file name="space2html.phpt" role="test" />
- <file name="text2html.phpt" role="test" />
</dir> <!-- /test/Horde/Text/Filter -->
</dir> <!-- /test/Horde/Text -->
</dir> <!-- /test/Horde -->
--- /dev/null
+<?php
+/**
+ * Horde_Text_Filter_Emails tests.
+ *
+ * @author Michael Slusarz <slusarz@horde.org>
+ * @category Horde
+ * @license http://www.fsf.org/copyleft/lgpl.html LGPL
+ * @package Text_Filter
+ * @subpackage UnitTests
+ */
+
+class Horde_Text_Filter_EmailsTest extends PHPUnit_Framework_TestCase
+{
+ public function testEmails()
+ {
+ $tests = array(
+ 'Inline address test@example.com test.' => 'Inline address <a class="pagelink" href="mailto:test@example.com">test@example.com</a> test.',
+ 'Inline protocol mailto: test@example.com test with whitespace.' => 'Inline protocol mailto: <a class="pagelink" href="mailto:test@example.com">test@example.com</a> test with whitespace.',
+ 'Inline Outlook [mailto:test@example.com] test.' => 'Inline Outlook [mailto:<a class="pagelink" href="mailto:test@example.com">test@example.com</a>] test.',
+ 'Inline angle brackets <test@example.com> test.' => 'Inline angle brackets <<a class="pagelink" href="mailto:test@example.com">test@example.com</a>> test.',
+ 'Inline angle brackets (HTML) <test@example.com> test.' => 'Inline angle brackets (HTML) <<a class="pagelink" href="mailto:test@example.com">test@example.com</a>> test.',
+ 'Inline angle brackets with mailto <mailto:test@example.com> test.' => 'Inline angle brackets with mailto <mailto:<a class="pagelink" href="mailto:test@example.com">test@example.com</a>> test.',
+ 'Inline with parameters test@example.com?subject=A%20subject&body=The%20message%20body test.' => 'Inline with parameters <a class="pagelink" href="mailto:test@example.com?subject=A%20subject&body=The%20message%20body">test@example.com?subject=A%20subject&body=The%20message%20body</a> test.',
+ 'Inline protocol with parameters mailto:test@example.com?subject=A%20subject&body=The%20message%20body test.' => 'Inline protocol with parameters mailto:<a class="pagelink" href="mailto:test@example.com?subject=A%20subject&body=The%20message%20body">test@example.com?subject=A%20subject&body=The%20message%20body</a> test.',
+ 'test@example.com in front test.' => '<a class="pagelink" href="mailto:test@example.com">test@example.com</a> in front test.',
+ 'At end test of test@example.com' => 'At end test of <a class="pagelink" href="mailto:test@example.com">test@example.com</a>',
+ 'Don\'t link http://test@www.horde.org/ test.' => 'Don\'t link http://test@www.horde.org/ test.',
+ 'Real world example: mailto:pmx-auto-approve%2b27f0e770e2d85bf9bd8fea61f9dedbff@example.com?subject=Release%20message%20from%20quarantine&body=%5b%23ptn6Pw-1%5d' => 'Real world example: mailto:<a class="pagelink" href="mailto:pmx-auto-approve%2b27f0e770e2d85bf9bd8fea61f9dedbff@example.com?subject=Release%20message%20from%20quarantine&body=%5b%23ptn6Pw-1%5d">pmx-auto-approve%2b27f0e770e2d85bf9bd8fea61f9dedbff@example.com?subject=Release%20message%20from%20quarantine&body=%5b%23ptn6Pw-1%5d</a>'
+ );
+
+ foreach ($tests as $key => $val) {
+ $filter = Horde_Text_Filter::filter($key, 'emails', array(
+ 'class' => 'pagelink'
+ ));
+ $this->assertEquals($val, $filter);
+ }
+ }
+
+}
--- /dev/null
+<?php
+/**
+ * Horde_Text_Filter_Environment tests.
+ *
+ * @author Michael Slusarz <slusarz@horde.org>
+ * @category Horde
+ * @license http://www.fsf.org/copyleft/lgpl.html LGPL
+ * @package Text_Filter
+ * @subpackage UnitTests
+ */
+
+class Horde_Text_Filter_EnvironmentTest extends PHPUnit_Framework_TestCase
+{
+ public function testEnvironment()
+ {
+ $tests = array(
+ 'Simple line' => 'Simple line',
+ 'Inline %FOO% variable' => 'Inline bar variable',
+ '%FOO% at start' => 'bar at start',
+ 'at end %FOO%' => 'at end bar',
+ '# %COMMENT% line' => '',
+ 'Variable %FOO% with # comment %COMMENT%' => 'Variable bar with ',
+ 'Simple line' => 'Simple line'
+ );
+
+ putenv('COMMENT=comment');
+ putenv('FOO=bar');
+
+ foreach ($tests as $key => $val) {
+ $filter = Horde_Text_Filter::filter($key, 'environment');
+ $this->assertEquals($val, $filter);
+ }
+ }
+
+}
--- /dev/null
+<?php
+/**
+ * Horde_Text_Filter_Html2text tests.
+ *
+ * @author Michael Slusarz <slusarz@horde.org>
+ * @category Horde
+ * @license http://www.fsf.org/copyleft/lgpl.html LGPL
+ * @package Text_Filter
+ * @subpackage UnitTests
+ */
+
+class Horde_Text_Filter_Html2textTest extends PHPUnit_Framework_TestCase
+{
+ public function testHtml2textVarious()
+ {
+ $html = <<<EOT
+<h2>Inline Formatting</h2>
+
+ Some text with leading and trailing whitespace
+
+<br />
+
+<hr />
+
+<h2>Table</h2>
+
+<table class="table">
+ <tr>
+ <th>Type</th>
+ <th>Representation</th>
+ </tr>
+ <tr>
+ <td class="table-cell">emphasis text</td>
+ <td class="table-cell"><em>emphasis text</em></td>
+ </tr>
+ <tr>
+ <td class="table-cell">strong text</td>
+ <td class="table-cell"><strong>strong text</strong></td>
+ </tr>
+ <tr>
+ <td class="table-cell">italic text</td>
+ <td class="table-cell"><i>italic text</i></td>
+ </tr>
+ <tr>
+ <td class="table-cell">bold text</td>
+ <td class="table-cell"><b>bold text</b></td>
+ </tr>
+ <tr>
+ <td class="table-cell">emphasis and strong</td>
+ <td class="table-cell"><em><strong>emphasis and strong</strong></em></td>
+ </tr>
+ <tr>
+ <td class="table-cell">underline text</td>
+ <td class="table-cell"><u>underline text</u></td>
+ </tr>
+</table>
+
+<hr />
+
+
+<h2>Links</h2>
+<a href="http://www.horde.org">Horde Homepage</a><br />
+<a href="mailto:test@example.com">Test User</a><br />
+Some inline <a href="http://www.horde.org">link</a>.<br />
+<a href="http://www.example.com">http://www.example.com</a><br />
+
+<hr />
+
+
+<h2>Headings</h2>
+<p>You can make various levels of heading by putting equals-signs before and
+after the text (all on its own line):</p>
+
+<h3>level 3 heading</h3>
+<h4>level 4 heading</h4>
+
+<h5>level 5 heading</h5>
+<h6>level 6 heading</h6>
+
+<hr />
+
+
+<h3>Bullet Lists</h3>
+<p>You can create bullet lists by starting a paragraph with one or more
+asterisks.</p>
+
+<ul>
+ <li>Bullet one<ul>
+ <li>Sub-bullet</li>
+ </ul></li>
+</ul>
+
+<h3>Numbered Lists</h3>
+<p>Similarly, you can create numbered lists by starting a paragraph with one
+or more hashes.</p>
+
+<ol>
+ <li>Numero uno</li>
+ <li>Number two<ol>
+ <li>Sub-item</li>
+ </ol></li>
+
+</ol>
+
+<h3>Mixing Bullet and Number List Items</h3>
+<p>You can mix and match bullet and number lists:</p>
+
+<ol>
+ <li>Number one<ul>
+ <li>Bullet</li>
+ <li>Bullet</li>
+ </ul></li>
+ <li>Number two<ul>
+ <li>Bullet</li>
+ <li>Bullet<ul>
+ <li>Sub-bullet<ol>
+ <li>Sub-sub-number</li>
+ <li>Sub-sub-number</li>
+ </ol></li>
+ </ul></li>
+ </ul></li>
+ <li>Number three<ul>
+ <li>Bullet</li>
+ <li>Bullet</li>
+ </ul></li>
+</ol>
+
+
+<h2>Block quoting</h2>
+<blockquote type="cite">
+<a href="http://www.horde.org">Horde Homepage</a><br />
+Some inline <a href="http://www.horde.org">link</a>.<br />
+</blockquote>
+
+Line inbetween.
+
+<blockquote type="cite">
+<h2>Heading inside quoting</h2>
+<p>This is a paragraph inside a block quoting. The result should be several
+lines prefixed with the > character.</p>
+</blockquote>
+
+
+<h2>Special Characters</h2>
+
+<div>
+ä
+é
+©
+™
+Đ
+</div>
+
+<p>Zitat von John Doe <john.doe@example.com>:</p>
+ <blockquote type="cite">
+ <div class="Section1">
+ <p class="MsoNormal"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;">Hallo lieber John,<o:p /></span></font></p>
+ <p class="MsoNormal"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></p>
+ <p class="MsoNormal"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;">Blah, blah.'<o:p /></span></font></p>
+ <p class="MsoNormal"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></p>
+ <p class="MsoNormal"><font size="3" face="Times New Roman"><span lang="EN-GB" style="font-size: 12pt;"><o:p> </o:p></span></font></p>
+ </div>
+ </blockquote>
+ <p> </p>
+ <p class="imp-signature"><!--begin_signature-->-- <br />
+Some signature<br /><a target="_blank" href="http://www.example.com">http://www.example.com</a><!--end_signature--></p>
+
+<p>Zitat von Jane Doe <jane.doe@example.com>:</p>
+ <blockquote type="cite">
+Jan Schneider a écrit :
+
+ <blockquote type="cite" cite="mid:20081007135151.190315kzjzymtbhc@neo.wg.de">Zitat von Jane Doe
+<a href="mailto:jane.doe@example.com" class="moz-txt-link-rfc2396E"><jane.doe@example.com></a>:
+ <br /> <br />
+ <blockquote type="cite">Hi,
+ <br /> <br />
+I prepare the last "horde-webmail-1.2" for production level but I have
+few questions:
+ <br />
+- is there a way to disable "external_display_cal" in kronolith, I
+don't want seeing birthdays calendars (turba) and task list (nag)
+ <br /> </blockquote> <br />
+They aren't displayed by default, or do you mean you don't want them to
+appear in the top right calendar panel?
+ <br />
+ </blockquote>
+Yes I don't want them to appear in the top right calendar panel but I
+want user can create their external_cal<br />
+ </blockquote><br />
+ <p class="imp-signature"><!--begin_signature-->Jan.<br /> <br />
+-- <br />
+Do you need professional PHP or Horde consulting?<br /> <a target="_blank" href="http://horde.org/consulting/">http://horde.org/consulting/</a><!--end_signature--></p>
+EOT;
+
+ $text = <<<EOT
+INLINE FORMATTING
+
+Some text with leading and trailing whitespace
+
+-------------------------
+
+TABLE
+
+ TYPE REPRESENTATION
+ emphasis text /emphasis text/
+ strong text STRONG TEXT
+ italic text /italic text/
+ bold text BOLD TEXT
+ emphasis and strong /EMPHASIS AND STRONG/
+ underline text _underline text_
+
+-------------------------
+
+LINKS
+
+Horde Homepage[1]
+Test User[2]
+Some inline link[1].
+http://www.example.com
+
+-------------------------
+
+HEADINGS
+
+You can make various levels of heading by putting equals-signs before
+and after the text (all on its own line):
+
+LEVEL 3 HEADING
+
+Level 4 Heading
+
+Level 5 Heading
+
+Level 6 Heading
+
+-------------------------
+
+BULLET LISTS
+
+You can create bullet lists by starting a paragraph with one or more
+asterisks.
+
+ * Bullet one
+
+ * Sub-bullet
+
+NUMBERED LISTS
+
+Similarly, you can create numbered lists by starting a paragraph with
+one or more hashes.
+
+ * Numero uno
+ * Number two
+
+ * Sub-item
+
+MIXING BULLET AND NUMBER LIST ITEMS
+
+You can mix and match bullet and number lists:
+
+ * Number one
+
+ * Bullet
+ * Bullet
+
+ * Number two
+
+ * Bullet
+ * Bullet
+
+ * Sub-bullet
+
+ * Sub-sub-number
+ * Sub-sub-number
+
+ * Number three
+
+ * Bullet
+ * Bullet
+
+BLOCK QUOTING
+
+> Horde Homepage[1]
+> Some inline link[1].
+
+Line inbetween.
+
+> HEADING INSIDE QUOTING
+>
+>
+> This is a paragraph inside a block quoting. The result should be
+> several lines prefixed with the > character.
+
+SPECIAL CHARACTERS
+
+ä é © ™ Đ
+
+Zitat von John Doe <john.doe@example.com>:
+
+> Hallo lieber John,
+>
+> Blah, blah.'
+
+--
+ Some signature
+http://www.example.com
+
+Zitat von Jane Doe <jane.doe@example.com>:
+
+> Jan Schneider a écrit :
+> > Zitat von Jane Doe <jane.doe@example.com>[3]:
+> > > Hi,
+> > >
+> > > I prepare the last "horde-webmail-1.2" for production level but
+> > > I have few questions:
+> > > - is there a way to disable "external_display_cal" in
+> > > kronolith, I don't want seeing birthdays calendars (turba) and
+> > > task list (nag)
+> > They aren't displayed by default, or do you mean you don't want
+> > them to appear in the top right calendar panel?
+> Yes I don't want them to appear in the top right calendar panel but
+> I want user can create their external_cal
+
+Jan.
+
+ --
+ Do you need professional PHP or Horde consulting?
+http://horde.org/consulting/
+
+
+Links:
+------
+[1] http://www.horde.org
+[2] mailto:test@example.com
+[3] mailto:jane.doe@example.com
+EOT;
+
+ $filter = Horde_Text_Filter::filter($html, 'Html2text', array(
+ 'charset' => 'UTF-8',
+ 'width' => 70
+ ));
+
+ $this->assertEquals($text, $filter);
+ }
+
+ public function testHtml2textLinks()
+ {
+ $html = <<<EOT
+<ul>
+ <li>This is a short line.</li>
+ <li>This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line.</li>
+ <li>And again a short line.</li>
+</ul>
+EOT;
+
+ $text_wrap = <<<EOT
+ * This is a short line.
+ * This is a long line. This is a long line. This
+is a long line. This is a long line. This is a
+long line. This is a long line. This is a long
+line. This is a long line. This is a long line.
+This is a long line. This is a long line. This is
+a long line.
+ * And again a short line.
+EOT;
+
+ $text_nowrap = <<<EOT
+ * This is a short line.
+ * This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line.
+ * And again a short line.
+EOT;
+
+ $filter = Horde_Text_Filter::filter($html, 'Html2text', array(
+ 'width' => 50
+ ));
+ $this->assertEquals($text_wrap, $filter);
+
+ $filter = Horde_Text_Filter::filter($html, 'Html2text', array(
+ 'width' => 0
+ ));
+ $this->assertEquals($text_nowrap, $filter);
+ }
+
+ public function testHtml2textQuoting()
+ {
+ $html = <<<EOT
+<p>Zitat von Roberto Maurizzi <roberto.maurizzi@gmail.com>:</p>
+ <blockquote type="cite">
+ <div class="gmail_quote">
+ <blockquote style="border-left: 1px solid #cccccc; margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">
+ <blockquote style="border-left: 1px solid #cccccc; margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">
+ <div class="Ih2E3d">
+ <blockquote style="border-left: 1px solid #cccccc; margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">4) In Turba, I can select a VFS driver to use. Currently it is set to<br />
+
+None and turba seems to be working fine. What does Turba use the VFS<br />
+for?<br /> </blockquote>
+ </div>
+ </blockquote><br />
+You can attach files to contacts with that.<br /> <br />
+Jan.<br /><font color="#888888"> </font>
+ </blockquote>
+ <div><br /></div>
+ </div>Anything similar for Kronolith, maybe in the new version?<br />I've googled a little and only found a discussion in 2004 about having attachment (or links) from VFS in Kronolith.<br />
+I'd really like to be able to attach all my taxes forms to the day I have to pay them ;-) and more in general all the extra documentation regarding an appointment.<br /><br />Ciao,<br /> Roberto<br /><br />
+ </blockquote>
+ <p>Some unquoted line with single ' quotes.</p>
+ <p class="imp-signature"><!--begin_signature-->Jan.<br /> <br />
+-- <br />
+Do you need professional PHP or Horde consulting?<br /> <a target="_blank" href="http://horde.org/consulting/">http://horde.org/consulting/</a><!--end_signature--></p>
+EOT;
+
+ $text = <<<EOT
+Zitat von Roberto Maurizzi <roberto.maurizzi@gmail.com>:
+
+> > > > 4) In Turba, I can select a VFS driver to use. Currently it is
+> > > > set to
+> > > > None and turba seems to be working fine. What does Turba use
+> > > > the VFS
+> > > > for?
+> > You can attach files to contacts with that.
+> >
+> > Jan.
+> Anything similar for Kronolith, maybe in the new version?
+> I've googled a little and only found a discussion in 2004 about
+> having attachment (or links) from VFS in Kronolith.
+> I'd really like to be able to attach all my taxes forms to the day
+> I have to pay them ;-) and more in general all the extra
+> documentation regarding an appointment.
+>
+> Ciao,
+> Roberto
+
+Some unquoted line with single ' quotes.
+
+Jan.
+
+ --
+ Do you need professional PHP or Horde consulting?
+http://horde.org/consulting/
+EOT;
+
+ $filter = Horde_Text_Filter::filter($html, 'Html2text', array(
+ 'width' => 70
+ ));
+ $this->assertEquals($text, $filter);
+ }
+
+}
--- /dev/null
+<?php
+/**
+ * Horde_Text_Filter_Space2html tests.
+ *
+ * @author Michael Slusarz <slusarz@horde.org>
+ * @category Horde
+ * @license http://www.fsf.org/copyleft/lgpl.html LGPL
+ * @package Text_Filter
+ * @subpackage UnitTests
+ */
+
+class Horde_Text_Filter_Space2htmlTest extends PHPUnit_Framework_TestCase
+{
+ public function testSpace2html()
+ {
+ $spaces = array(
+ 'x x',
+ 'x x',
+ 'x x',
+ 'x x',
+ 'x x'
+ );
+
+ $results = array(
+ 'x x',
+ 'x x',
+ 'x x',
+ 'x x',
+ 'x x',
+ );
+
+ $results_encode_all = array(
+ 'x x',
+ 'x x',
+ 'x x',
+ 'x x',
+ 'x x'
+ );
+
+ foreach ($spaces as $key => $val) {
+ $filter = Horde_Text_Filter::filter($val, 'space2html', array(
+ 'encode_all' => false
+ ));
+ $this->assertEquals($results[$key], $filter);
+
+ $filter = Horde_Text_Filter::filter($val, 'space2html', array(
+ 'encode_all' => true
+ ));
+ $this->assertEquals($results_encode_all[$key], $filter);
+ }
+ }
+
+}
--- /dev/null
+<?php
+/**
+ * Horde_Text_Filter_Text2html tests.
+ *
+ * @author Michael Slusarz <slusarz@horde.org>
+ * @category Horde
+ * @license http://www.fsf.org/copyleft/lgpl.html LGPL
+ * @package Text_Filter
+ * @subpackage UnitTests
+ */
+
+class Horde_Text_Filter_Text2htmlTest extends PHPUnit_Framework_TestCase
+{
+ public function testText2html()
+ {
+ $tests = array(
+ 'http://www.horde.org/foo/',
+ 'https://jan:secret@www.horde.org/foo/',
+ 'mailto:jan@example.com',
+ 'svn+ssh://jan@svn.example.com/path/',
+ '<tag>foo</tag>',
+ '<http://css.maxdesign.com.au/listamatic/>',
+ 'http://www.horde.org/?foo=bar&baz=qux',
+ 'http://www.<alert>.horde.org/',
+ 'http://www.2.horde.org/'
+ );
+
+ $levels = array(
+ Horde_Text_Filter_Text2html::PASSTHRU => array(
+ 'http://www.horde.org/foo/',
+ 'https://jan:secret@www.horde.org/foo/',
+ 'mailto:jan@example.com',
+ 'svn+ssh://jan@svn.example.com/path/',
+ '<tag>foo</tag>',
+ '<http://css.maxdesign.com.au/listamatic/>',
+ 'http://www.horde.org/?foo=bar&baz=qux',
+ 'http://www.<alert>.horde.org/',
+ 'http://www.2.horde.org/',
+ ),
+ Horde_Text_Filter_Text2html::SYNTAX => array(
+ '<a href="http://www.horde.org/foo/" target="_blank">http://www.horde.org/foo/</a>',
+ '<a href="https://jan:secret@www.horde.org/foo/" target="_blank">https://jan:secret@www.horde.org/foo/</a>',
+ 'mailto:<a href="mailto:jan@example.com">jan@example.com</a>',
+ '<a href="svn+ssh://jan@svn.example.com/path/" target="_blank">svn+ssh://jan@svn.example.com/path/</a>',
+ '<tag>foo</tag>',
+ '<<a href="http://css.maxdesign.com.au/listamatic/" target="_blank">http://css.maxdesign.com.au/listamatic/</a>>',
+ '<a href="http://www.horde.org/?foo=bar&baz=qux" target="_blank">http://www.horde.org/?foo=bar&baz=qux</a>',
+ '<a href="http://www" target="_blank">http://www</a>.<alert>.horde.org/',
+ '<a href="http://www.&#x32;.horde.org/" target="_blank">http://www.&#x32;.horde.org/</a>'
+ ),
+ Horde_Text_Filter_Text2html::MICRO => array(
+ '<a href="http://www.horde.org/foo/" target="_blank">http://www.horde.org/foo/</a>',
+ '<a href="https://jan:secret@www.horde.org/foo/" target="_blank">https://jan:secret@www.horde.org/foo/</a>',
+ 'mailto:<a href="mailto:jan@example.com">jan@example.com</a>',
+ '<a href="svn+ssh://jan@svn.example.com/path/" target="_blank">svn+ssh://jan@svn.example.com/path/</a>',
+ '<tag>foo</tag>',
+ '<<a href="http://css.maxdesign.com.au/listamatic/" target="_blank">http://css.maxdesign.com.au/listamatic/</a>>',
+ '<a href="http://www.horde.org/?foo=bar&baz=qux" target="_blank">http://www.horde.org/?foo=bar&baz=qux</a>',
+ '<a href="http://www" target="_blank">http://www</a>.<alert>.horde.org/',
+ '<a href="http://www.&#x32;.horde.org/" target="_blank">http://www.&#x32;.horde.org/</a>'
+ ),
+ Horde_Text_Filter_Text2html::MICRO_LINKURL => array(
+ '<a href="http://www.horde.org/foo/" target="_blank">http://www.horde.org/foo/</a>',
+ '<a href="https://jan:secret@www.horde.org/foo/" target="_blank">https://jan:secret@www.horde.org/foo/</a>',
+ 'mailto:jan@example.com',
+ '<a href="svn+ssh://jan@svn.example.com/path/" target="_blank">svn+ssh://jan@svn.example.com/path/</a>',
+ '<tag>foo</tag>',
+ '<<a href="http://css.maxdesign.com.au/listamatic/" target="_blank">http://css.maxdesign.com.au/listamatic/</a>>',
+ '<a href="http://www.horde.org/?foo=bar&baz=qux" target="_blank">http://www.horde.org/?foo=bar&baz=qux</a>',
+ '<a href="http://www" target="_blank">http://www</a>.<alert>.horde.org/',
+ '<a href="http://www.&#x32;.horde.org/" target="_blank">http://www.&#x32;.horde.org/</a>'
+ ),
+ Horde_Text_Filter_Text2html::NOHTML => array(
+ 'http://www.horde.org/foo/',
+ 'https://jan:secret@www.horde.org/foo/',
+ 'mailto:jan@example.com',
+ 'svn+ssh://jan@svn.example.com/path/',
+ '<tag>foo</tag>',
+ '<http://css.maxdesign.com.au/listamatic/>',
+ 'http://www.horde.org/?foo=bar&baz=qux',
+ 'http://www.<alert>.horde.org/',
+ 'http://www.&#x32;.horde.org/'
+ ),
+ Horde_Text_Filter_Text2html::NOHTML_NOBREAK => array(
+ 'http://www.horde.org/foo/',
+ 'https://jan:secret@www.horde.org/foo/',
+ 'mailto:jan@example.com',
+ 'svn+ssh://jan@svn.example.com/path/',
+ '<tag>foo</tag>',
+ '<http://css.maxdesign.com.au/listamatic/>',
+ 'http://www.horde.org/?foo=bar&baz=qux',
+ 'http://www.<alert>.horde.org/',
+ 'http://www.&#x32;.horde.org/'
+ )
+ );
+
+ foreach ($levels as $level => $results) {
+ foreach ($tests as $key => $val) {
+ $filter = Horde_Text_Filter::filter($val, 'text2html', array(
+ 'parselevel' => $level
+ ));
+ $this->assertEquals($results[$key], $filter);
+ }
+ }
+ }
+
+}
+++ /dev/null
---TEST--
-Horde_Text_Filter_Email tests
---FILE--
-<?php
-
-require dirname(__FILE__) . '/../../../../lib/Horde/Text/Filter.php';
-require dirname(__FILE__) . '/../../../../lib/Horde/Text/Filter/Base.php';
-require dirname(__FILE__) . '/../../../../lib/Horde/Text/Filter/Emails.php';
-
-$emails = <<<EOT
-Inline address test@example.com test.
-Inline protocol mailto: test@example.com test with whitespace.
-Inline Outlook [mailto:test@example.com] test.
-Inline angle brackets <test@example.com> test.
-Inline angle brackets (HTML) <test@example.com> test.
-Inline angle brackets with mailto <mailto:test@example.com> test.
-Inline with parameters test@example.com?subject=A%20subject&body=The%20message%20body test.
-Inline protocol with parameters mailto:test@example.com?subject=A%20subject&body=The%20message%20body test.
-test@example.com in front test.
-At end test of test@example.com
-Don't link http://test@www.horde.org/ test.
-Real world example: mailto:pmx-auto-approve%2b27f0e770e2d85bf9bd8fea61f9dedbff@example.com?subject=Release%20message%20from%20quarantine&body=%5b%23ptn6Pw-1%5d
-EOT;
-
-echo Horde_Text_Filter::filter($emails, 'emails', array('class' => 'pagelink'));
-
-?>
---EXPECT--
-Inline address <a class="pagelink" href="mailto:test@example.com" title="New Message to test@example.com">test@example.com</a> test.
-Inline protocol mailto: <a class="pagelink" href="mailto:test@example.com" title="New Message to test@example.com">test@example.com</a> test with whitespace.
-Inline Outlook [mailto:<a class="pagelink" href="mailto:test@example.com" title="New Message to test@example.com">test@example.com</a>] test.
-Inline angle brackets <<a class="pagelink" href="mailto:test@example.com" title="New Message to test@example.com">test@example.com</a>> test.
-Inline angle brackets (HTML) <<a class="pagelink" href="mailto:test@example.com" title="New Message to test@example.com">test@example.com</a>> test.
-Inline angle brackets with mailto <mailto:<a class="pagelink" href="mailto:test@example.com" title="New Message to test@example.com">test@example.com</a>> test.
-Inline with parameters <a class="pagelink" href="mailto:test@example.com?subject=A%20subject&body=The%20message%20body" title="New Message to test@example.com">test@example.com?subject=A%20subject&body=The%20message%20body</a> test.
-Inline protocol with parameters mailto:<a class="pagelink" href="mailto:test@example.com?subject=A%20subject&body=The%20message%20body" title="New Message to test@example.com">test@example.com?subject=A%20subject&body=The%20message%20body</a> test.
-<a class="pagelink" href="mailto:test@example.com" title="New Message to test@example.com">test@example.com</a> in front test.
-At end test of <a class="pagelink" href="mailto:test@example.com" title="New Message to test@example.com">test@example.com</a>
-Don't link http://test@www.horde.org/ test.
-Real world example: mailto:<a class="pagelink" href="mailto:pmx-auto-approve%2b27f0e770e2d85bf9bd8fea61f9dedbff@example.com?subject=Release%20message%20from%20quarantine&body=%5b%23ptn6Pw-1%5d" title="New Message to pmx-auto-approve%2b27f0e770e2d85bf9bd8fea61f9dedbff@example.com">pmx-auto-approve%2b27f0e770e2d85bf9bd8fea61f9dedbff@example.com?subject=Release%20message%20from%20quarantine&body=%5b%23ptn6Pw-1%5d</a>
+++ /dev/null
---TEST--
-Horde_Text_Filter_Environment tests
---FILE--
-<?php
-
-require dirname(__FILE__) . '/../../../../lib/Horde/Text/Filter.php';
-require dirname(__FILE__) . '/../../../../lib/Horde/Text/Filter/Base.php';
-require dirname(__FILE__) . '/../../../../lib/Horde/Text/Filter/Environment.php';
-
-$env = <<<EOT
-Simple line
-Inline %FOO% variable
-%FOO% at start
-at end %FOO%
-# %COMMENT% line
-Variable %FOO% with # comment %COMMENT%
-Simple line
-EOT;
-
-putenv('FOO=bar');
-putenv('COMMENT=comment');
-echo Horde_Text_Filter::filter($env, 'environment');
-
-?>
---EXPECT--
-Simple line
-Inline bar variable
-bar at start
-at end bar
-Variable bar with
-Simple line
+++ /dev/null
-<h2>Inline Formatting</h2>
-
- Some text with leading and trailing whitespace
-
-<br />
-
-<hr />
-
-<h2>Table</h2>
-
-<table class="table">
- <tr>
- <th>Type</th>
- <th>Representation</th>
- </tr>
- <tr>
- <td class="table-cell">emphasis text</td>
- <td class="table-cell"><em>emphasis text</em></td>
- </tr>
- <tr>
- <td class="table-cell">strong text</td>
- <td class="table-cell"><strong>strong text</strong></td>
- </tr>
- <tr>
- <td class="table-cell">italic text</td>
- <td class="table-cell"><i>italic text</i></td>
- </tr>
- <tr>
- <td class="table-cell">bold text</td>
- <td class="table-cell"><b>bold text</b></td>
- </tr>
- <tr>
- <td class="table-cell">emphasis and strong</td>
- <td class="table-cell"><em><strong>emphasis and strong</strong></em></td>
- </tr>
- <tr>
- <td class="table-cell">underline text</td>
- <td class="table-cell"><u>underline text</u></td>
- </tr>
-</table>
-
-<hr />
-
-
-<h2>Links</h2>
-<a href="http://www.horde.org">Horde Homepage</a><br />
-<a href="mailto:test@example.com">Test User</a><br />
-Some inline <a href="http://www.horde.org">link</a>.<br />
-<a href="http://www.example.com">http://www.example.com</a><br />
-
-<hr />
-
-
-<h2>Headings</h2>
-<p>You can make various levels of heading by putting equals-signs before and
-after the text (all on its own line):</p>
-
-<h3>level 3 heading</h3>
-<h4>level 4 heading</h4>
-
-<h5>level 5 heading</h5>
-<h6>level 6 heading</h6>
-
-<hr />
-
-
-<h3>Bullet Lists</h3>
-<p>You can create bullet lists by starting a paragraph with one or more
-asterisks.</p>
-
-<ul>
- <li>Bullet one<ul>
- <li>Sub-bullet</li>
- </ul></li>
-</ul>
-
-<h3>Numbered Lists</h3>
-<p>Similarly, you can create numbered lists by starting a paragraph with one
-or more hashes.</p>
-
-<ol>
- <li>Numero uno</li>
- <li>Number two<ol>
- <li>Sub-item</li>
- </ol></li>
-
-</ol>
-
-<h3>Mixing Bullet and Number List Items</h3>
-<p>You can mix and match bullet and number lists:</p>
-
-<ol>
- <li>Number one<ul>
- <li>Bullet</li>
- <li>Bullet</li>
- </ul></li>
- <li>Number two<ul>
- <li>Bullet</li>
- <li>Bullet<ul>
- <li>Sub-bullet<ol>
- <li>Sub-sub-number</li>
- <li>Sub-sub-number</li>
- </ol></li>
- </ul></li>
- </ul></li>
- <li>Number three<ul>
- <li>Bullet</li>
- <li>Bullet</li>
- </ul></li>
-</ol>
-
-
-<h2>Block quoting</h2>
-<blockquote type="cite">
-<a href="http://www.horde.org">Horde Homepage</a><br />
-Some inline <a href="http://www.horde.org">link</a>.<br />
-</blockquote>
-
-Line inbetween.
-
-<blockquote type="cite">
-<h2>Heading inside quoting</h2>
-<p>This is a paragraph inside a block quoting. The result should be several
-lines prefixed with the > character.</p>
-</blockquote>
-
-
-<h2>Special Characters</h2>
-
-<div>
-ä
-é
-©
-™
-Đ
-</div>
-
-<p>Zitat von John Doe <john.doe@example.com>:</p>
- <blockquote type="cite">
- <div class="Section1">
- <p class="MsoNormal"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;">Hallo lieber John,<o:p /></span></font></p>
- <p class="MsoNormal"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></p>
- <p class="MsoNormal"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;">Blah, blah.'<o:p /></span></font></p>
- <p class="MsoNormal"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></p>
- <p class="MsoNormal"><font size="3" face="Times New Roman"><span lang="EN-GB" style="font-size: 12pt;"><o:p> </o:p></span></font></p>
- </div>
- </blockquote>
- <p> </p>
- <p class="imp-signature"><!--begin_signature-->-- <br />
-Some signature<br /><a target="_blank" href="http://www.example.com">http://www.example.com</a><!--end_signature--></p>
-
-<p>Zitat von Jane Doe <jane.doe@example.com>:</p>
- <blockquote type="cite">
-Jan Schneider a écrit :
-
- <blockquote type="cite" cite="mid:20081007135151.190315kzjzymtbhc@neo.wg.de">Zitat von Jane Doe
-<a href="mailto:jane.doe@example.com" class="moz-txt-link-rfc2396E"><jane.doe@example.com></a>:
- <br /> <br />
- <blockquote type="cite">Hi,
- <br /> <br />
-I prepare the last "horde-webmail-1.2" for production level but I have
-few questions:
- <br />
-- is there a way to disable "external_display_cal" in kronolith, I
-don't want seeing birthdays calendars (turba) and task list (nag)
- <br /> </blockquote> <br />
-They aren't displayed by default, or do you mean you don't want them to
-appear in the top right calendar panel?
- <br />
- </blockquote>
-Yes I don't want them to appear in the top right calendar panel but I
-want user can create their external_cal<br />
- </blockquote><br />
- <p class="imp-signature"><!--begin_signature-->Jan.<br /> <br />
--- <br />
-Do you need professional PHP or Horde consulting?<br /> <a target="_blank" href="http://horde.org/consulting/">http://horde.org/consulting/</a><!--end_signature--></p>
+++ /dev/null
-http://www.horde.org/foo/
-https://jan:secret@www.horde.org/foo/
-mailto:jan@example.com
-svn+ssh://jan@svn.example.com/path/
-<tag>foo</tag>
-<http://css.maxdesign.com.au/listamatic/>
-http://www.horde.org/?foo=bar&baz=qux
-http://www.<alert>.horde.org/
-http://www.2.horde.org/
+++ /dev/null
---TEST--
-Horde_Text_Filter_Html2text tests
---FILE--
-<?php
-
-require_once 'Horde/String.php';
-require_once 'Horde/Util.php';
-require dirname(__FILE__) . '/../../../../lib/Horde/Text/Filter.php';
-require dirname(__FILE__) . '/../../../../lib/Horde/Text/Filter/Base.php';
-require dirname(__FILE__) . '/../../../../lib/Horde/Text/Filter/Html2text.php';
-$html = file_get_contents(dirname(__FILE__) . '/fixtures/html2text.html');
-echo Horde_Text_Filter::filter($html, 'Html2text', array('charset' => 'UTF-8'));
-
-?>
---EXPECT--
-INLINE FORMATTING
-
-Some text with leading and trailing whitespace
-
--------------------------
-
-TABLE
-
- TYPE REPRESENTATION
- emphasis text /emphasis text/
- strong text STRONG TEXT
- italic text /italic text/
- bold text BOLD TEXT
- emphasis and strong /EMPHASIS AND STRONG/
- underline text _underline text_
-
--------------------------
-
-LINKS
-
-Horde Homepage[1]
-Test User[2]
-Some inline link[1].
-http://www.example.com
-
--------------------------
-
-HEADINGS
-
-You can make various levels of heading by putting equals-signs before
-and after the text (all on its own line):
-
-LEVEL 3 HEADING
-
-Level 4 Heading
-
-Level 5 Heading
-
-Level 6 Heading
-
--------------------------
-
-BULLET LISTS
-
-You can create bullet lists by starting a paragraph with one or more
-asterisks.
-
- * Bullet one
-
- * Sub-bullet
-
-NUMBERED LISTS
-
-Similarly, you can create numbered lists by starting a paragraph with
-one or more hashes.
-
- * Numero uno
- * Number two
-
- * Sub-item
-
-MIXING BULLET AND NUMBER LIST ITEMS
-
-You can mix and match bullet and number lists:
-
- * Number one
-
- * Bullet
- * Bullet
-
- * Number two
-
- * Bullet
- * Bullet
-
- * Sub-bullet
-
- * Sub-sub-number
- * Sub-sub-number
-
- * Number three
-
- * Bullet
- * Bullet
-
-BLOCK QUOTING
-
-> Horde Homepage[1]
-> Some inline link[1].
-
-Line inbetween.
-
-> HEADING INSIDE QUOTING
->
->
-> This is a paragraph inside a block quoting. The result should be
-> several lines prefixed with the > character.
-
-SPECIAL CHARACTERS
-
-ä é © ™ Đ
-
-Zitat von John Doe <john.doe@example.com>:
-
-> Hallo lieber John,
->
-> Blah, blah.'
-
---
- Some signature
-http://www.example.com
-
-Zitat von Jane Doe <jane.doe@example.com>:
-
-> Jan Schneider a écrit :
-> > Zitat von Jane Doe <jane.doe@example.com>[3]:
-> > > Hi,
-> > >
-> > > I prepare the last "horde-webmail-1.2" for production level but
-> > > I have few questions:
-> > > - is there a way to disable "external_display_cal" in
-> > > kronolith, I don't want seeing birthdays calendars (turba) and
-> > > task list (nag)
-> > They aren't displayed by default, or do you mean you don't want
-> > them to appear in the top right calendar panel?
-> Yes I don't want them to appear in the top right calendar panel but
-> I want user can create their external_cal
-
-Jan.
-
- --
- Do you need professional PHP or Horde consulting?
-http://horde.org/consulting/
-
-
-Links:
-------
-[1] http://www.horde.org
-[2] mailto:test@example.com
-[3] mailto:jane.doe@example.com
+++ /dev/null
---TEST--
-Horde_Text_Filter_Html2text lists test
---FILE--
-<?php
-
-require_once 'Horde/String.php';
-require_once 'Horde/Util.php';
-require dirname(__FILE__) . '/../../../../lib/Horde/Text/Filter.php';
-require dirname(__FILE__) . '/../../../../lib/Horde/Text/Filter/Base.php';
-require dirname(__FILE__) . '/../../../../lib/Horde/Text/Filter/Html2text.php';
-
-$html = <<<EOT
-<ul>
- <li>This is a short line.</li>
- <li>This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line.</li>
- <li>And again a short line.</li>
-</ul>
-EOT;
-
-echo Horde_Text_Filter::filter($html, 'Html2text', array('wrap' => 50));
-echo "\n\n";
-echo Horde_Text_Filter::filter($html, 'Html2text', array('wrap' => false));
-
-?>
---EXPECT--
- * This is a short line.
- * This is a long line. This is a long line. This
-is a long line. This is a long line. This is a
-long line. This is a long line. This is a long
-line. This is a long line. This is a long line.
-This is a long line. This is a long line. This is
-a long line.
- * And again a short line.
-
- * This is a short line.
- * This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line.
- * And again a short line.
+++ /dev/null
---TEST--
-Horde_Text_Filter_Html2text quoting test
---FILE--
-<?php
-
-require_once 'Horde/String.php';
-require_once 'Horde/Util.php';
-require dirname(__FILE__) . '/../../../../lib/Horde/Text/Filter.php';
-require dirname(__FILE__) . '/../../../../lib/Horde/Text/Filter/Base.php';
-require dirname(__FILE__) . '/../../../../lib/Horde/Text/Filter/Html2text.php';
-$html = <<<EOT
-<p>Zitat von Roberto Maurizzi <roberto.maurizzi@gmail.com>:</p>
- <blockquote type="cite">
- <div class="gmail_quote">
- <blockquote style="border-left: 1px solid #cccccc; margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">
- <blockquote style="border-left: 1px solid #cccccc; margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">
- <div class="Ih2E3d">
- <blockquote style="border-left: 1px solid #cccccc; margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">4) In Turba, I can select a VFS driver to use. Currently it is set to<br />
-
-None and turba seems to be working fine. What does Turba use the VFS<br />
-for?<br /> </blockquote>
- </div>
- </blockquote><br />
-You can attach files to contacts with that.<br /> <br />
-Jan.<br /><font color="#888888"> </font>
- </blockquote>
- <div><br /></div>
- </div>Anything similar for Kronolith, maybe in the new version?<br />I've googled a little and only found a discussion in 2004 about having attachment (or links) from VFS in Kronolith.<br />
-I'd really like to be able to attach all my taxes forms to the day I have to pay them ;-) and more in general all the extra documentation regarding an appointment.<br /><br />Ciao,<br /> Roberto<br /><br />
- </blockquote>
- <p>Some unquoted line with single ' quotes.</p>
- <p class="imp-signature"><!--begin_signature-->Jan.<br /> <br />
--- <br />
-Do you need professional PHP or Horde consulting?<br /> <a target="_blank" href="http://horde.org/consulting/">http://horde.org/consulting/</a><!--end_signature--></p>
-EOT;
-echo Horde_Text_Filter::filter($html, 'html2text');
-
-?>
---EXPECT--
-Zitat von Roberto Maurizzi <roberto.maurizzi@gmail.com>:
-
-> > > > 4) In Turba, I can select a VFS driver to use. Currently it is
-> > > > set to
-> > > > None and turba seems to be working fine. What does Turba use
-> > > > the VFS
-> > > > for?
-> > You can attach files to contacts with that.
-> >
-> > Jan.
-> Anything similar for Kronolith, maybe in the new version?
-> I've googled a little and only found a discussion in 2004 about
-> having attachment (or links) from VFS in Kronolith.
-> I'd really like to be able to attach all my taxes forms to the day
-> I have to pay them ;-) and more in general all the extra
-> documentation regarding an appointment.
->
-> Ciao,
-> Roberto
-
-Some unquoted line with single ' quotes.
-
-Jan.
-
- --
- Do you need professional PHP or Horde consulting?
-http://horde.org/consulting/
+++ /dev/null
---TEST--
-Horde_Text_Filter_Space2html tests
---FILE--
-<?php
-
-require dirname(__FILE__) . '/../../../../lib/Horde/Text/Filter.php';
-require dirname(__FILE__) . '/../../../../lib/Horde/Text/Filter/Base.php';
-require dirname(__FILE__) . '/../../../../lib/Horde/Text/Filter/Space2html.php';
-
-$spaces = array('x x', 'x x', 'x x', 'x x', 'x x');
-foreach ($spaces as $space) {
- echo Horde_Text_Filter::filter($space, 'space2html', array('encode_all' => false));
- echo "\n";
- echo Horde_Text_Filter::filter($space, 'space2html', array('encode_all' => true));
- echo "\n";
-}
-
-?>
---EXPECT--
-x x
-x x
-x x
-x x
-x x
-x x
-x x
-x x
-x x
-x x
+++ /dev/null
---TEST--
-Horde_Text_Filter_Text2html tests
---FILE--
-<?php
-
-require_once 'Horde.php';
-require_once 'Horde/Exception.php';
-require_once 'Horde/String.php';
-require_once 'Horde/Util.php';
-require dirname(__FILE__) . '/../../../../lib/Horde/Text/Filter.php';
-require dirname(__FILE__) . '/../../../../lib/Horde/Text/Filter/Base.php';
-require dirname(__FILE__) . '/../../../../lib/Horde/Text/Filter/Emails.php';
-require dirname(__FILE__) . '/../../../../lib/Horde/Text/Filter/Linkurls.php';
-require dirname(__FILE__) . '/../../../../lib/Horde/Text/Filter/Space2html.php';
-require dirname(__FILE__) . '/../../../../lib/Horde/Text/Filter/Text2html.php';
-
-$_COOKIE[session_name()] = true;
-$text = file_get_contents(dirname(__FILE__) . '/fixtures/text2html.txt');
-$params = array('class' => null);
-$levels = array(Horde_Text_Filter_Text2html::PASSTHRU,
- Horde_Text_Filter_Text2html::SYNTAX,
- Horde_Text_Filter_Text2html::MICRO,
- Horde_Text_Filter_Text2html::MICRO_LINKURL,
- Horde_Text_Filter_Text2html::NOHTML,
- Horde_Text_Filter_Text2html::NOHTML_NOBREAK);
-
-foreach ($levels as $level) {
- $params['parselevel'] = $level;
- echo Horde_Text_Filter::filter($text, 'text2html', $params);
- echo "-------------------------------------------------\n";
-}
-
-?>
---EXPECT--
-http://www.horde.org/foo/
-https://jan:secret@www.horde.org/foo/
-mailto:jan@example.com
-svn+ssh://jan@svn.example.com/path/
-<tag>foo</tag>
-<http://css.maxdesign.com.au/listamatic/>
-http://www.horde.org/?foo=bar&baz=qux
-http://www.<alert>.horde.org/
-http://www.2.horde.org/
--------------------------------------------------
-<a href="http://www.horde.org/foo/" target="_blank">http://www.horde.org/foo/</a><br />
-<a href="https://jan:secret@www.horde.org/foo/" target="_blank">https://jan:secret@www.horde.org/foo/</a><br />
-mailto:<a href="mailto:jan@example.com" title="New Message to jan@example.com">jan@example.com</a><br />
-<a href="svn+ssh://jan@svn.example.com/path/" target="_blank">svn+ssh://jan@svn.example.com/path/</a><br />
-<tag>foo</tag><br />
-<<a href="http://css.maxdesign.com.au/listamatic/" target="_blank">http://css.maxdesign.com.au/listamatic/</a>><br />
-<a href="http://www.horde.org/?foo=bar&baz=qux" target="_blank">http://www.horde.org/?foo=bar&baz=qux</a><br />
-<a href="http://www" target="_blank">http://www</a>.<alert>.horde.org/<br />
-<a href="http://www.&#x32;.horde.org/" target="_blank">http://www.&#x32;.horde.org/</a><br />
--------------------------------------------------
-<a href="http://www.horde.org/foo/" target="_blank">http://www.horde.org/foo/</a><br />
-<a href="https://jan:secret@www.horde.org/foo/" target="_blank">https://jan:secret@www.horde.org/foo/</a><br />
-mailto:<a href="mailto:jan@example.com" title="New Message to jan@example.com">jan@example.com</a><br />
-<a href="svn+ssh://jan@svn.example.com/path/" target="_blank">svn+ssh://jan@svn.example.com/path/</a><br />
-<tag>foo</tag><br />
-<<a href="http://css.maxdesign.com.au/listamatic/" target="_blank">http://css.maxdesign.com.au/listamatic/</a>><br />
-<a href="http://www.horde.org/?foo=bar&baz=qux" target="_blank">http://www.horde.org/?foo=bar&baz=qux</a><br />
-<a href="http://www" target="_blank">http://www</a>.<alert>.horde.org/<br />
-<a href="http://www.&#x32;.horde.org/" target="_blank">http://www.&#x32;.horde.org/</a><br />
--------------------------------------------------
-<a href="http://www.horde.org/foo/" target="_blank">http://www.horde.org/foo/</a><br />
-<a href="https://jan:secret@www.horde.org/foo/" target="_blank">https://jan:secret@www.horde.org/foo/</a><br />
-mailto:jan@example.com<br />
-<a href="svn+ssh://jan@svn.example.com/path/" target="_blank">svn+ssh://jan@svn.example.com/path/</a><br />
-<tag>foo</tag><br />
-<<a href="http://css.maxdesign.com.au/listamatic/" target="_blank">http://css.maxdesign.com.au/listamatic/</a>><br />
-<a href="http://www.horde.org/?foo=bar&baz=qux" target="_blank">http://www.horde.org/?foo=bar&baz=qux</a><br />
-<a href="http://www" target="_blank">http://www</a>.<alert>.horde.org/<br />
-<a href="http://www.&#x32;.horde.org/" target="_blank">http://www.&#x32;.horde.org/</a><br />
--------------------------------------------------
-http://www.horde.org/foo/<br />
-https://jan:secret@www.horde.org/foo/<br />
-mailto:jan@example.com<br />
-svn+ssh://jan@svn.example.com/path/<br />
-<tag>foo</tag><br />
-<http://css.maxdesign.com.au/listamatic/><br />
-http://www.horde.org/?foo=bar&baz=qux<br />
-http://www.<alert>.horde.org/<br />
-http://www.&#x32;.horde.org/<br />
--------------------------------------------------
-http://www.horde.org/foo/
-https://jan:secret@www.horde.org/foo/
-mailto:jan@example.com
-svn+ssh://jan@svn.example.com/path/
-<tag>foo</tag>
-<http://css.maxdesign.com.au/listamatic/>
-http://www.horde.org/?foo=bar&baz=qux
-http://www.<alert>.horde.org/
-http://www.&#x32;.horde.org/
--------------------------------------------------