From: Chip Black Date: Thu, 3 Mar 2011 10:40:58 +0000 (-0800) Subject: Escape @ and #, as well; fix username in User.reload() X-Git-Tag: v1.5~2 X-Git-Url: http://git.bytex64.net/?a=commitdiff_plain;h=3f2f34bd763a1f3e1da52a0ca0e66ca4daacc1ca;p=blerg.git Escape @ and #, as well; fix username in User.reload() --- diff --git a/www/js/blerg.js b/www/js/blerg.js index 28f0849..944f112 100644 --- a/www/js/blerg.js +++ b/www/js/blerg.js @@ -240,7 +240,7 @@ User.prototype.reload = function() { $$('[name=user.unsubscribelink]').each(Element.hide); if (loginStatus.loggedIn) { - new Ajax.Request(baseURL + '/feedinfo/' + username, { + new Ajax.Request(baseURL + '/feedinfo/' + this.username, { method: 'post', parameters: { username: loginStatus.username @@ -350,9 +350,6 @@ function mangleRecord(record, template) { l = l.replace(/([^\w\\]|^)\*\*(\w[^*]*)\*\*(\W|$)/g, '$1$2$3'); l = l.replace(/([^\w\\]|^)\*(\w[^*]*)\*(\W|$)/g, '$1$2$3'); - // Remove backslashes from escaped metachars - l = l.replace(/\\([*\[\]])/g, '$1'); - // Turn refs and tags into links l = l.replace(/(\s|^)#([A-Za-z0-9_-]+)/g, '$1#$2'); l = l.replace(/(\s|^)@([A-Za-z0-9_-]+)/g, '$1@$2'); @@ -380,6 +377,9 @@ function mangleRecord(record, template) { } } + // Remove backslashes from escaped metachars + l = l.replace(/\\([*\[\]@#])/g, '$1'); + out.push(l); if (endpush) { out.push(endpush);