From: Mischa POSLAWSKY Date: Thu, 27 Apr 2017 00:38:40 +0000 (+0200) Subject: browser: strip link urls from cell titles X-Git-Tag: v1.10~59 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/c7ea69c641705f93aad1f35f14cc0425691aa0a5 browser: strip link urls from cell titles --- diff --git a/browser.plp b/browser.plp index 85ed156..de245b8 100644 --- a/browser.plp +++ b/browser.plp @@ -311,6 +311,15 @@ sub formatnotes { return @html; } +sub notestotitle { + my @notes = @_; + for (@notes) { + EscapeHTML($_); + s{ \[ ([^]]*) \] \( [^)]* \) }{$1}gx; # strip link urls + } + return @notes; +} + sub saytitlecol { my ($id) = @_; my $row = $caniuse->{data}->{$id}; @@ -396,7 +405,7 @@ sub saybrowsercols { map { split / /, $_ } $prev )); - $title .= "\n".EscapeHTML($_) for @notes; + $title .= "\n$_" for notestotitle(@notes); printf('%s', join(' ',