]> Sergey Matveev's repositories - public-inbox.git/commitdiff
t/hl_mod: extra check to ensure we escape HTML
authorEric Wong <e@80x24.org>
Sun, 27 Jan 2019 11:35:29 +0000 (11:35 +0000)
committerEric Wong <e@80x24.org>
Sun, 27 Jan 2019 11:43:34 +0000 (11:43 +0000)
Otherwise, it's open season on our users :<

t/hl_mod.t

index b8b8eb9d3a459185c06e365cacb3285868b6a7a6..62cc62488f51479c401fda9c76103857f57fd5c0 100644 (file)
@@ -20,6 +20,7 @@ my $orig = $str;
        my $ref = $hls->do_hl(\$str, 'foo.perl');
        is(ref($ref), 'SCALAR', 'got a scalar reference back');
        like($$ref, qr/I can see you!/, 'we can see ourselves in output');
+       like($$ref, qr/&amp;&amp;/, 'escaped');
 
        use PublicInbox::Spawn qw(which);
        if (eval { require IPC::Run } && which('w3m')) {