diff options
author | Eric Wong <e@80x24.org> | 2014-04-06 06:59:43 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2014-04-06 06:59:43 +0000 |
commit | 994250c358ec523fd4e1e74c32a310fad6a025d3 (patch) | |
tree | e22abdd53a55e1a3ed96a96e70071ea390b3673f /lib/PublicInbox | |
parent | 630bddde22338179f23be5143ca14135383826b6 (diff) | |
download | public-inbox-994250c358ec523fd4e1e74c32a310fad6a025d3.tar.gz |
Avoid adding extraneous whitespace in HTML content, as it increases bandwidth usage of network, disk and memory.
Diffstat (limited to 'lib/PublicInbox')
-rw-r--r-- | lib/PublicInbox/View.pm | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 4ac28346..18ba36a8 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -8,13 +8,13 @@ use CGI qw/escapeHTML/; use Encode qw/decode encode/; use Encode::MIME::Header; -# only one public function: +# public functions: sub as_html { my ($class, $mime, $full_pfx) = @_; headers_to_html_header($mime) . multipart_text_as_html($mime, $full_pfx) . - "</pre>\n"; + '</pre>'; } sub as_feed_entry { @@ -150,10 +150,8 @@ sub headers_to_html_header { } $rv .= "\n"; - return ("<html><head><title>". - join(' - ', @title) . - '</title></head><body><pre style="white-space:pre-wrap">' . - $rv); + ("<html><head><title>". join(' - ', @title) . + '</title></head><body><pre style="white-space:pre-wrap">' . $rv); } 1; |