X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fautohandler;fp=httemplate%2Fautohandler;h=ad0ab8ba6892a25bd1346111729c071cc1594de1;hp=a3f7eb0086db5a097cbdd7751c852aa965fb6473;hb=2c757d7db4cb6a7b9655de13206fcc84fb7ce61f;hpb=c46235292c6bf929615ac28fc48c1d5609ce4590 diff --git a/httemplate/autohandler b/httemplate/autohandler index a3f7eb008..ad0ab8ba6 100644 --- a/httemplate/autohandler +++ b/httemplate/autohandler @@ -9,7 +9,15 @@ if ( UNIVERSAL::can(dbh, 'sprintProfile') ) { if ( lc($r->content_type) eq 'text/html' ) { - $profile = '
'. encode_entities(dbh->sprintProfile()).
+    # barely worth it, just in case someone tries to use profiling on a
+    # non-RT install
+    eval "use Text::Wrapper;";
+    die $@ if $@;
+
+    my $wrapper = new Text::Wrapper( columns => 80 );
+
+    $profile = '
'.
+               encode_entities( $wrapper->wrap( dbh->sprintProfile() ) ).
                #"\n\n". &sprintAutoProfile(). '
'; "\n\n". '
'; }