about summary refs log tree commit homepage
path: root/lib/PublicInbox/ViewDiff.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-01-20 10:57:13 +0000
committerEric Wong <e@80x24.org>2019-01-20 11:43:19 +0000
commit0fe405673ec45fed1be5898f3bb938ce09f304dd (patch)
treed270bf75dba1d4cbb7ff9d26ecb65d3581402e88 /lib/PublicInbox/ViewDiff.pm
parentcc7d286096a2fded30eca035ca98e42a08c934a5 (diff)
downloadpublic-inbox-0fe405673ec45fed1be5898f3bb938ce09f304dd.tar.gz
We still need to use XHTML the Atom feed, and XHTML requires
attributes to be quoted, whereas HTML 5 does not.
Diffstat (limited to 'lib/PublicInbox/ViewDiff.pm')
-rw-r--r--lib/PublicInbox/ViewDiff.pm10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/PublicInbox/ViewDiff.pm b/lib/PublicInbox/ViewDiff.pm
index 1fa18459..45d28e37 100644
--- a/lib/PublicInbox/ViewDiff.pm
+++ b/lib/PublicInbox/ViewDiff.pm
@@ -54,17 +54,17 @@ sub diff_hunk ($$$$) {
         my ($n) = ($ca =~ /^-(\d+)/);
         $n = defined($n) ? do { ++$n; "#n$n" } : '';
 
-        my $rv = qq(@@ <a\nhref=$spfx$oid_a/s/$dctx->{Q}$n>$ca</a>);
+        my $rv = qq(@@ <a\nhref="$spfx$oid_a/s/$dctx->{Q}$n">$ca</a>);
 
         ($n) = ($cb =~ /^\+(\d+)/);
         $n = defined($n) ? do { ++$n; "#n$n" } : '';
 
-        $rv .= qq( <a\nhref=$spfx$oid_b/s/$dctx->{Q}$n>$cb</a> @@);
+        $rv .= qq( <a\nhref="$spfx$oid_b/s/$dctx->{Q}$n">$cb</a> @@);
 }
 
 sub oid ($$$) {
         my ($dctx, $spfx, $oid) = @_;
-        defined($spfx) ? qq(<a\nhref=$spfx$oid/s/$dctx->{Q}>$oid</a>) : $oid;
+        defined($spfx) ? qq(<a\nhref="$spfx$oid/s/$dctx->{Q}">$oid</a>) : $oid;
 }
 
 sub to_state ($$$) {
@@ -72,7 +72,7 @@ sub to_state ($$$) {
         $$dst .= '</span>' if $state2class[$state];
         $_[1] = $new_state;
         my $class = $state2class[$new_state] or return;
-        $$dst .= "<span\nclass=$class>";
+        $$dst .= qq(<span\nclass="$class">);
 }
 
 sub flush_diff ($$$$) {
@@ -117,7 +117,7 @@ sub flush_diff ($$$$) {
                         $$dst .= to_html($linkify, $s);
                 } elsif ($s =~ s/^@@ (\S+) (\S+) @@//) {
                         $$dst .= '</span>' if $state2class[$state];
-                        $$dst .= "<span\nclass=hunk>";
+                        $$dst .= qq(<span\nclass="hunk">);
                         $$dst .= diff_hunk($dctx, $spfx, $1, $2);
                         $$dst .= '</span>';
                         $state = DSTATE_CTX;