peerdb/tripe-newpeers.in: Remove (undocumented) whitespace fixing.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 26 May 2018 13:48:11 +0000 (14:48 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 14 Jun 2018 11:50:38 +0000 (12:50 +0100)
I don't think we ever needed this, except that there's a longstanding
mLib bug which means that newlines (and other whitespace other than
actual space characters) aren't escaped in `lax' mode, which would have
caused the `cdb-map' output to be broken.

Easy fix: turn off lax mode.

peerdb/tripe-newpeers.in

index b8cf681..2287dab 100644 (file)
@@ -519,10 +519,10 @@ def output(conf, cdb):
       try: u = sec.get('user')
       except MissingKeyException: pass
       else: cdb.add('U%s' % u)
-    url = M.URLEncode(laxp = True, semip = True)
+    url = M.URLEncode(semip = True)
     for key in sorted(sec.items()):
       if not key.startswith('@'):
-        url.encode(key, ' '.join(M.split(sec.get(key))[0]))
+        url.encode(key, sec.get(key))
     cdb.add(label, url.result)
   cdb.add('%AUTO', ' '.join(auto))
   cdb.finish()