]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Hval.pm
reduce "PublicInbox::Hval->new_oneline" use
[public-inbox.git] / lib / PublicInbox / Hval.pm
index d295f5ce3d29fb8d783e2550e75975fe237fcba7..70bae7c67db9bfc59e36779016e1842a3292a7ff 100644 (file)
@@ -9,6 +9,8 @@ use warnings;
 use Encode qw(find_encoding);
 use URI::Escape qw(uri_escape_utf8);
 use PublicInbox::MID qw/mid_clean/;
+use base qw/Exporter/;
+our @EXPORT_OK = qw/ascii_html/;
 
 # for user-generated content (UGC) which may have excessively long lines
 # and screw up rendering on some browsers.  This is the only CSS style
@@ -69,4 +71,9 @@ sub raw {
        }
 }
 
+sub prurl {
+       my ($env, $u) = @_;
+       index($u, '//') == 0 ? "$env->{'psgi.url_scheme'}:$u" : $u;
+}
+
 1;