[Rt-commit] rt branch, 4.2/html-external-formatter, repushed

Alex Vandiver alexmv at bestpractical.com
Tue Feb 3 13:25:15 EST 2015


The branch 4.2/html-external-formatter was deleted and repushed:
       was 568f22a5db4aca745d68095fe6fab59c9fb8aee2
       now 6337505bc81b49b8d402a8dda12a3ddef56eb411

1:  d9507ef ! 1:  c40ba50 Use HTML::FormatExternal to allow external HTML → text formatters
    @@ -3,10 +3,37 @@
         Use HTML::FormatExternal to allow external HTML → text formatters
         
         The HTML::FormatText::WithLinks::AndTables module is unmaintained, and
    -    contains multiple bugs which trigger runtime errors.  Add
    -    HTML::FormatExternal as an optional dependency for slower but more
    -    reliable HTML to text conversion using external text-based web browsers
    -    and text conversion tools.
    +    contains multiple bugs which trigger runtime errors.  In such cases, RT
    +    sends out an empty text/plain part -- if HTML templates are not in use,
    +    this results in an entirely empty email.
    +    
    +    Add HTML::FormatExternal as an optional dependency for more reliable
    +    HTML to text conversion using external text-based web browsers and text
    +    conversion tools.
    +    
    +    Benchmarking shows that shelling out to an external program on complex
    +    HTML is comparable in speed (or faster!) than the pure-perl formatter
    +    (20/s).  On simple HTML, the pure-perl formatter is an order of
    +    magnitude faster -- but the slowest external formatter (elinks) still
    +    runs at 5/sec, and most run at 20-50/s.  This is judged to not be likely
    +    to cause a performance impact, as it is run at most once per scrip.
    +
    +diff --git a/docs/UPGRADING-4.2 b/docs/UPGRADING-4.2
    +--- a/docs/UPGRADING-4.2
    ++++ b/docs/UPGRADING-4.2
    +@@
    + display.  They have been removed, and setting them will trigger an
    + informational message that setting them is ineffective.
    + 
    ++=head1 UPGRADING FROM 4.2.9 AND EARLIER
    ++
    ++An additional optional dependency, L<HTML::FormatExternal>, has been
    ++added.  This allows RT to use C<w3m>, C<elinks>, C<html2text>, or other
    ++external tools to render HTML to text.  This dependency is not installed
    ++by default; however, its use is strongly encouraged, and will resolve
    ++issues with blank outgoing emails.
    ++
    + =cut
     
     diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
     --- a/etc/RT_Config.pm.in
    @@ -17,16 +44,19 @@
      
     +=item C<$HTMLFormatter>
     +
    -+The external HTML formatter to use.  The default is to try, in order,
    -+C<w3m>, C<elinks>, C<html2text>, C<links>, C<lynx>, and then fall back
    -+to the C<core> pure-perl formatter.  The pure-perl formatter is
    -+significantly faster than the others, but may fail to successfully
    -+convert even on some relatively simple HTML.  Falls back to C<core> if
    -+the configured program is not installed.
    ++RT's default pure-perl formatter may fail to successfully convert even
    ++on some relatively simple HTML; this will result in blank C<text/plain>
    ++parts, which is particuarly unfortunate if HTML templates are not in
    ++use.
     +
    -+Using formatters other than C<core> requires that the
    -+L<HTML::FormatExternal> module be installed; it is an optional
    -+dependency which RT will not install by default.
    ++If the optional dependency L<HTML::FormatExternal> is installed, RT will
    ++use external programs to render HTML to plain text.  The default is to
    ++try, in order, C<w3m>, C<elinks>, C<html2text>, C<links>, C<lynx>, and
    ++then fall back to the C<core> pure-perl formatter if none are installed.
    ++
    ++Set C<$HTMLFormatter> to one of the above programs (or the full path to
    ++such) to use a different program than the above would choose by default.
    ++Setting this requires that L<HTML::FormatExternal> be installed.
     +
     +=cut
     +
2:  e21f248 ! 2:  23b64b5 Allow $HTMLFormatter to contain the full path
    @@ -6,8 +6,8 @@
     --- a/etc/RT_Config.pm.in
     +++ b/etc/RT_Config.pm.in
     @@
    - L<HTML::FormatExternal> module be installed; it is an optional
    - dependency which RT will not install by default.
    + such) to use a different program than the above would choose by default.
    + Setting this requires that L<HTML::FormatExternal> be installed.
      
     +If the chosen formatter is not in the webserver's $PATH, you may set
     +this option the full path to one of the aforementioned executables.
3:  1a39cd1 = 3:  24365b3 Provide a default PATH in cases where it is unset (mod_fastcgi)
4:  296d5c2 = 4:  927ece5 Set an $ENV{HOME} that the external formatters can write under
5:  568f22a = 5:  6337505 Update tests to work with any of the HTML formatters



More information about the rt-commit mailing list