[mnemo] html tags in notes

Rob Siklos rob2 at siklos.ca
Thu Apr 17 14:29:28 PDT 2003


Hello,

I'm not sure how much this has been discussed, but I think it would be
really useful to be able to put html elements in Mnemo notes (like links to
images, font size/colour formatting, etc).

A really easy way to do this (in latest HEAD), would be to change the
htmlSpaces() call on line 4 of mnemo/templates/view/description.inc to some
function like htmlJustSpaces().  htmlJustSpaces is identical to
horde/lib/Text.php::htmlSpaces, except the line with htmlspecialchars() is
taken out.

### BEGIN htmlJustSpaces() ####
     /* Same as htmlSpaces() but dosn't convert html tags and special chars
     * @param string $text  The string of text to convert.
     * @return string  The HTML-compliant converted text.     */
    function htmlJustSpaces($text = '')
    {
        $text = str_replace("\t", '        ', $text);
        $text = str_replace('  ', '  ', $text);
        $text = str_replace('  ', '  ', $text);

        return $text;
    }
### END htmlJustSpaces() ####

Any thoughts? Worth commiting?


Rob Siklos



More information about the mnemo mailing list