
Hi, A lot of our users are using email in HTML format. Unfortunately the OTRS html2txt feature doesn't transform HTML entities. My question: with not use the HTML::Transform perl module to do it (or HTML::FormatText::WithLinks)? I've done a small modification on my OTRS test system and it works fine. I've just added a single line of perl code to do this in Kernel/System/EmailParser.pm and removed all the things that were done by the OTRS perl code: $Self->{MessageBody} = HTML::FormatText->format_string($Self->{MessageBody}, leftmargin => 0, rightmargin => $Self->{ConfigObject}->Get('Ticket::Frontend::TextAreaEmail')); Regards

No opinion about that enhancement?
2007/8/22, Sébastien Prud'homme
Hi,
A lot of our users are using email in HTML format. Unfortunately the OTRS html2txt feature doesn't transform HTML entities.
My question: with not use the HTML::Transform perl module to do it (or HTML::FormatText::WithLinks)?
I've done a small modification on my OTRS test system and it works fine. I've just added a single line of perl code to do this in Kernel/System/EmailParser.pm and removed all the things that were done by the OTRS perl code:
$Self->{MessageBody} = HTML::FormatText->format_string($Self->{MessageBody}, leftmargin => 0, rightmargin => $Self->{ConfigObject}->Get('Ticket::Frontend::TextAreaEmail'));
Regards

Hi Sébastien, Have you opened a bug at bugs.otrs.org for this? Regards, Simon On 12-Sep-07, at 3:41 AM, Sébastien Prud'homme wrote:
No opinion about that enhancement?
2007/8/22, Sébastien Prud'homme
: Hi,
A lot of our users are using email in HTML format. Unfortunately the OTRS html2txt feature doesn't transform HTML entities.
My question: with not use the HTML::Transform perl module to do it (or HTML::FormatText::WithLinks)?
I've done a small modification on my OTRS test system and it works fine. I've just added a single line of perl code to do this in Kernel/System/EmailParser.pm and removed all the things that were done by the OTRS perl code:
$Self->{MessageBody} = HTML::FormatText->format_string($Self->{MessageBody}, leftmargin => 0, rightmargin => $Self->{ConfigObject}->Get ('Ticket::Frontend::TextAreaEmail'));
Regards
_______________________________________________ OTRS mailing list: dev - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/dev To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev

Hi Sébastien, Sébastien Prud'homme schrieb:
A lot of our users are using email in HTML format. Unfortunately the OTRS html2txt feature doesn't transform HTML entities.
My question: with not use the HTML::Transform perl module to do it (or HTML::FormatText::WithLinks)?
I've done a small modification on my OTRS test system and it works fine. I've just added a single line of perl code to do this in Kernel/System/EmailParser.pm and removed all the things that were done by the OTRS perl code:
$Self->{MessageBody} = HTML::FormatText->format_string($Self->{MessageBody}, leftmargin => 0, rightmargin => $Self->{ConfigObject}->Get('Ticket::Frontend::TextAreaEmail'));
Yes, like Simon says. I saw there is an bug entry from you: http://bugs.otrs.org/show_bug.cgi?id=1186 I have checked this and was able to reproduce it. More info in the bug report! :-) Many thanks for your help! -Martin ((otrs)) :: OTRS GmbH :: Europaring 4 :: D - 94315 Straubing Fon: +49 (0) 9421 56818 0 :: Fax: +49 (0) 9421 56818 18 http://www.otrs.com/ :: Communication with success!

Thanks!
Don't be offensed but i don't understand why you "reinvent the wheel"
by not using HTML::Format. There are yet a lot of CPAN modules
incorporated into OTRS in Kernel/cpan-lib. Perhaps there is something
in this module that is not fitted to OTRS?
2007/9/13, Martin Edenhofer
Hi Sébastien,
Sébastien Prud'homme schrieb:
A lot of our users are using email in HTML format. Unfortunately the OTRS html2txt feature doesn't transform HTML entities.
My question: with not use the HTML::Transform perl module to do it (or HTML::FormatText::WithLinks)?
I've done a small modification on my OTRS test system and it works fine. I've just added a single line of perl code to do this in Kernel/System/EmailParser.pm and removed all the things that were done by the OTRS perl code:
$Self->{MessageBody} = HTML::FormatText->format_string($Self->{MessageBody}, leftmargin => 0, rightmargin => $Self->{ConfigObject}->Get('Ticket::Frontend::TextAreaEmail'));
Yes, like Simon says. I saw there is an bug entry from you:
http://bugs.otrs.org/show_bug.cgi?id=1186
I have checked this and was able to reproduce it.
More info in the bug report! :-)
Many thanks for your help!
-Martin
((otrs)) :: OTRS GmbH :: Europaring 4 :: D - 94315 Straubing Fon: +49 (0) 9421 56818 0 :: Fax: +49 (0) 9421 56818 18 http://www.otrs.com/ :: Communication with success! _______________________________________________ OTRS mailing list: dev - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/dev To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev

Hi Sébastien, Sébastien Prud'homme schrieb:
Thanks!
Don't be offensed but i don't understand why you "reinvent the wheel" by not using HTML::Format. There are yet a lot of CPAN modules incorporated into OTRS in Kernel/cpan-lib. Perhaps there is something in this module that is not fitted to OTRS?
You are right. The better way is to put HTML::Format into the Kernel/cpan-lib. The problem in this case is, that HTML::Format is require two more cpan modules (Font::AFM and HTML::Element). HTML::Element needs HTML::Tree. HTML::Tree needs HTML::Parser and HTML::Tagset. But HTML::Parser is no perl pure module. So if you want to use HTML::Format, you need to install min. one more module from cpan. So this is the reason why I took only the correct encoding from the module. If you still have questions, feel free to ask. :) -Martin
2007/9/13, Martin Edenhofer
: Hi Sébastien,
Sébastien Prud'homme schrieb:
A lot of our users are using email in HTML format. Unfortunately the OTRS html2txt feature doesn't transform HTML entities.
My question: with not use the HTML::Transform perl module to do it (or HTML::FormatText::WithLinks)?
I've done a small modification on my OTRS test system and it works fine. I've just added a single line of perl code to do this in Kernel/System/EmailParser.pm and removed all the things that were done by the OTRS perl code:
$Self->{MessageBody} = HTML::FormatText->format_string($Self->{MessageBody}, leftmargin => 0, rightmargin => $Self->{ConfigObject}->Get('Ticket::Frontend::TextAreaEmail')); Yes, like Simon says. I saw there is an bug entry from you:
http://bugs.otrs.org/show_bug.cgi?id=1186
I have checked this and was able to reproduce it.
More info in the bug report! :-)
Many thanks for your help!
-Martin
participants (3)
-
Martin Edenhofer
-
Simon Boulet
-
Sébastien Prud'homme