[horde] Blank lines in the mail

Joao S Veiga jsveiga at rf.com.br
Fri Jan 8 19:22:11 UTC 2016


Hi Ralph,

Attached is the patch file with the changes I made to workaround this  
in my system.

The first part is optional and only reduces the line spacing on the  
quoted text style; even not adding blank lines, the style still has  
large line spacings.

The second part just chops off every <o:p></o:p> pair of tags,  
introduced by outlook. Yes, it is altering content, but so does the  
current situation, which adds lines recursively every time an email is  
replied back and forth.

If you don't know how to apply a patch, or if it does not apply (not  
sure if my version is the same as yours):

- locate the Imp Compose.php file in the server (in my debian  
installation, it's in /usr/share/horde/imp/lib),

- make a backup of it,

- edit the file and look for the line:

/* The blockquote tag to use to indicate quoted text in HTML data. */
     const HTML_BLOCKQUOTE = '<blockquote type="cite"  
style="border-left:2px solid blue;margin-left:2px;padding-left:12px;">';

- edit the line adding "line-height: 100%;" to the style so it ends with

.... padding-left:12px;line-height: 100%;">';

- now find the function (notice the underline before getMessageText)

     protected function _getMessageText($contents, array $options = array())

- locate the line below inside this function:

     if ($mode == 'html') {

- and add the following two lines right below it:

        $msg = str_replace("<o:p></o:p>", "", $msg);
        $msg = str_replace("<o:p> </o:p>", "", $msg);

- save the file and test replying/forwarding one of the problematic  
emails (original from outlook, not one already sent from horde with  
the added blank lines).

Disclaimer: I am not a Horde developer, and this is not endorsed nor  
reviewed nor tested by them. I have about 80 users, and it is working  
fine, but for other people it may break things, set your server on  
fire, and get you in the NSA black list.

Best regards,

Joao S Veiga
-------------- next part --------------
A non-text attachment was scrubbed...
Name: imp_lib_Compose.php.patch
Type: text/x-diff
Size: 933 bytes
Desc: not available
URL: <http://lists.horde.org/archives/horde/attachments/20160108/d0902ef5/attachment.bin>


More information about the horde mailing list