From: Mischa POSLAWSKY Date: Wed, 15 Dec 2010 03:22:36 +0000 (+0100) Subject: browser: assume notes are valid html X-Git-Tag: v1.4~8 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/0fdebc22a878aa9bd791103c8878eeb82e006b2d browser: assume notes are valid html Latest database-derived data no longer contains invalid entities, just linebreaks not represented by html in #video. --- diff --git a/browser.plp b/browser.plp index aaafa03..7c494e9 100644 --- a/browser.plp +++ b/browser.plp @@ -236,7 +236,8 @@ sub saytitlecol { } $row->{title}; print '
'; s/\.?$/./, print "

$_

" for map { ref $_ ? @$_ : $_ || () } - Entity($row->{description}), formathtml($row->{notes}); # sic + Entity($row->{description}), + map { s/\s*\n/\n
/g; $_ } $row->{notes}; printf 'Resources: %s.', join(', ', map { sprintf '%s', EscapeHTML($_->{url}), $_->{title} } @$_) for grep { @$_ } $row->{links} // (); @@ -310,16 +311,6 @@ for my $id (sort { say ''; say ''; -sub formathtml { - my $ref = defined wantarray ? [@_] : \@_; - for (@$ref) { - s/& (?!\w)/&/gx; - s/< \s/</gx; - s/\n\K\n/
/g; - } - return @$ref; -} - sub paddedver { # normalised version number comparable as string (cmp) shift =~ /(?:.*-|^)(\d*)(.*)/;