Patchwork D1078: hgweb: use native strings consistently for querystring parsing

login
register
mail settings
Submitter phabricator
Date Oct. 14, 2017, 9:03 p.m.
Message ID <5911145835e7315aff14fa9fa5d8f86b@localhost.localdomain>
Download mbox | patch
Permalink /patch/24921/
State Not Applicable
Headers show

Comments

phabricator - Oct. 14, 2017, 9:03 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGd1fccbd50fcd: hgweb: use native strings consistently for querystring parsing (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1078?vs=2742&id=2754

REVISION DETAIL
  https://phab.mercurial-scm.org/D1078

AFFECTED FILES
  mercurial/hgweb/hgweb_mod.py
  mercurial/hgweb/hgwebdir_mod.py

CHANGE DETAILS




To: durin42, #hg-reviewers, indygreg
Cc: mercurial-devel

Patch

diff --git a/mercurial/hgweb/hgwebdir_mod.py b/mercurial/hgweb/hgwebdir_mod.py
--- a/mercurial/hgweb/hgwebdir_mod.py
+++ b/mercurial/hgweb/hgwebdir_mod.py
@@ -508,7 +508,7 @@ 
         if style == styles[0]:
             vars['style'] = style
 
-        start = '&' if url[-1] == '?' else '?'
+        start = r'&' if url[-1] == r'?' else r'?'
         sessionvars = webutil.sessionvars(vars, start)
         logourl = config('web', 'logourl')
         logoimg = config('web', 'logoimg')
diff --git a/mercurial/hgweb/hgweb_mod.py b/mercurial/hgweb/hgweb_mod.py
--- a/mercurial/hgweb/hgweb_mod.py
+++ b/mercurial/hgweb/hgweb_mod.py
@@ -187,7 +187,7 @@ 
         if style == styles[0]:
             vars['style'] = style
 
-        start = '&' if req.url[-1] == '?' else '?'
+        start = r'&' if req.url[-1] == r'?' else r'?'
         sessionvars = webutil.sessionvars(vars, start)
 
         if not self.reponame: