html table fix
[freeside.git] / httemplate / autohandler
1 % $m->call_next;
2 <%init>
3   dbh->{'private_profile'} = {} if UNIVERSAL::can(dbh, 'sprintProfile');
4 </%init>
5 <%filter>
6
7 my $profile = '';
8 if ( UNIVERSAL::can(dbh, 'sprintProfile') ) {
9
10   if ( lc($r->content_type) eq 'text/html' ) {
11
12     $profile = '<PRE>'. ("\n"x4096). encode_entities(dbh->sprintProfile()).
13                #"\n\n". &sprintAutoProfile(). '</PRE>';
14                "\n\n".                        '</PRE>';
15   } 
16
17   dbh->{'private_profile'} = {};
18 }
19
20 s/(<\/BODY>[\s\n]*<\/HTML>[\s\n]*)$/$profile$1/i;
21 </%filter>