user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH 2/3] viewdiff: escape HTML ampersand for renames
  2019-02-01  7:50  7% [PATCH 0/3] viewvcs odds and ends Eric Wong
@ 2019-02-01  7:50  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2019-02-01  7:50 UTC (permalink / raw)
  To: meta

For URLs we generate, we need to escape '&' in query parameters
for correctness.
---
 lib/PublicInbox/ViewDiff.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/PublicInbox/ViewDiff.pm b/lib/PublicInbox/ViewDiff.pm
index 2074e12..fbdc5b9 100644
--- a/lib/PublicInbox/ViewDiff.pm
+++ b/lib/PublicInbox/ViewDiff.pm
@@ -133,8 +133,8 @@ sub flush_diff ($$$) {
 					Q => "?b=".uri_escape_utf8($pb, UNSAFE),
 				};
 				if ($pa ne $pb) {
-					$dctx->{Q} .=
-					     "&a=".uri_escape_utf8($pa, UNSAFE);
+					$dctx->{Q} .= '&a='.
+						uri_escape_utf8($pa, UNSAFE);
 				}
 				anchor1($dst, $ctx, $linkify, $pb, $s) and next;
 			}
-- 
EW


^ permalink raw reply related	[relevance 7%]

* [PATCH 0/3] viewvcs odds and ends
@ 2019-02-01  7:50  7% Eric Wong
  2019-02-01  7:50  7% ` [PATCH 2/3] viewdiff: escape HTML ampersand for renames Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2019-02-01  7:50 UTC (permalink / raw)
  To: meta

Some corner-case fixes around some odd filenames,
long paths and renames.

Eric Wong (3):
  viewvcs: allow '0' as a valid filename for blob downloads
  viewdiff: escape HTML ampersand for renames
  viewdiff: support renames and long paths in diffstat anchors

 lib/PublicInbox/View.pm     |  1 +
 lib/PublicInbox/ViewDiff.pm | 62 ++++++++++++++++++++++++++++---------
 lib/PublicInbox/ViewVCS.pm  |  2 +-
 3 files changed, 49 insertions(+), 16 deletions(-)

-- 
EW


^ permalink raw reply	[relevance 7%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2019-02-01  7:50  7% [PATCH 0/3] viewvcs odds and ends Eric Wong
2019-02-01  7:50  7% ` [PATCH 2/3] viewdiff: escape HTML ampersand for renames Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).