Dont strip :code:& and :code:- from the end of URLs

Fixes #2436
This commit is contained in:
Kovid Goyal
2020-03-15 08:29:56 +05:30
parent e8a9935cb2
commit e86c712424
4 changed files with 10 additions and 2 deletions

View File

@@ -281,6 +281,10 @@ class TestDataTypes(BaseTest):
l4 = create(' xxxxxtekljhgdkjgd')
self.ae(l4.url_end_at(0), 0)
for trail in '/-&':
l4 = create('http://a.b?q=1' + trail)
self.ae(l4.url_end_at(1), len(l4) - 1)
def rewrap(self, lb, lb2):
hb = HistoryBuf(lb2.ynum, lb2.xnum)
cy = lb.rewrap(lb2, hb)