# # # patch "static/viewmtn.js" # from [23105923aafa2b392cdf13677cb659012539605a] # to [001ab5902c148053998d2d6877c82ee3da848d70] # # patch "viewmtn.py" # from [e31a4d0ce63bf0a454bb5fe6dc9a531ef18760a7] # to [b3f9aad3f3ab96d1e1efcdc67eb88ead4ccdb06b] # ============================================================ --- static/viewmtn.js 23105923aafa2b392cdf13677cb659012539605a +++ static/viewmtn.js 001ab5902c148053998d2d6877c82ee3da848d70 @@ -127,14 +127,11 @@ function mouseOverHandler(boundTo, evt) if (boundTo.jsonData) { return updatePopup(boundTo, className); } - //if (boundTo.id) { - // var uri = baseURI + "/json/" + encodeURIComponent(className) + "/" + encodeURIComponent(boundTo.id); - // pendingDeferred = callLater(1, partial(dampenedJSON, uri, boundTo, className)); - // pendingFor = boundTo; - //} - var uri = baseURI + "/json/" + encodeURIComponent(className) + "/%5B%22" + encodeURIComponent(boundTo.firstChild.innerHTML) + "%22%5D"; - pendingDeferred = callLater(1, partial(dampenedJSON, uri, boundTo, className)); - pendingFor = boundTo; + if (boundTo.id) { + var uri = baseURI + "/json/" + encodeURIComponent(className) + "/" + encodeURIComponent(boundTo.id); + pendingDeferred = callLater(1, partial(dampenedJSON, uri, boundTo, className)); + pendingFor = boundTo; + } } function mouseOutHandler(boundTo, evt) ============================================================ --- viewmtn.py e31a4d0ce63bf0a454bb5fe6dc9a531ef18760a7 +++ viewmtn.py b3f9aad3f3ab96d1e1efcdc67eb88ead4ccdb06b @@ -33,6 +33,7 @@ import heapq import release hq = cgi.escape import heapq +import base64 import web debug = web.debug @@ -121,9 +122,9 @@ class Link: return self.description rv = '%s' % (uri, d) if self.json_args != None: -# rv = '' % (hq(urllib.quote(json.write(self.json_args))), -# hq(str(self.__class__).split('.')[-1])) + rv + '' - rv = '' % hq(str(self.__class__).split('.')[-1]) + rv + '' + enc_args = base64.encodestring(json.write(self.json_args)).rstrip() + rv = '' % (hq(enc_args), + hq(str(self.__class__).split('.')[-1])) + rv + '' return rv class AuthorLink(Link): @@ -1198,7 +1199,7 @@ class Json(object): def GET(self, method, encoded_args): writer = json.JsonWriter() - args = json.read(urllib.unquote(encoded_args)) + args = json.read(base64.decodestring((encoded_args))) if hasattr(self, method): rv = getattr(self, method)(*args) else: