[horde] Blank lines in the mail

Ralph Ballier ballier at mail.schule.de
Sun Jan 17 21:05:31 UTC 2016


  Zitat von Joao S Veiga <jsveiga at rf.com.br>:

> 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

Hello Joao,

I have applied your patch and it works wonderful!! Thank you very much for
this.

I hope somebody can integrate this patch in the distribution. Otherwise
there is the same problem afte upgrade.

Ralph


More information about the horde mailing list