about summary refs log tree commit homepage
path: root/lib/PublicInbox/Hval.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-12-15 20:58:50 +0000
committerEric Wong <e@80x24.org>2015-12-22 00:58:06 +0000
commite00a6f63ef80f3540a159ef4fdc4bba359dc5596 (patch)
tree3e84daeddd3a216c1c4a4f46d4ffa736c843583f /lib/PublicInbox/Hval.pm
parent3273b47d02dd353cd2efe1cd0bdeca1334e3942e (diff)
downloadpublic-inbox-e00a6f63ef80f3540a159ef4fdc4bba359dc5596.tar.gz
User-generated content (UGC) may have excessively long lines
which screw up rendering.  This is the only bit of CSS we use.
Diffstat (limited to 'lib/PublicInbox/Hval.pm')
-rw-r--r--lib/PublicInbox/Hval.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/PublicInbox/Hval.pm b/lib/PublicInbox/Hval.pm
index ab6e044b..e0b85c68 100644
--- a/lib/PublicInbox/Hval.pm
+++ b/lib/PublicInbox/Hval.pm
@@ -10,6 +10,11 @@ use Encode qw(find_encoding);
 use URI::Escape qw(uri_escape_utf8);
 use PublicInbox::MID qw/mid_clean/;
 
+# for user-generated content (UGC) which may have excessively long lines
+# and screw up rendering on some browsers.  This is the only CSS style
+# feature we use.
+use constant PRE => "<pre\nstyle=\"white-space:pre-wrap\">";
+
 my $enc_ascii = find_encoding('us-ascii');
 
 sub new {