From 3f2f34bd763a1f3e1da52a0ca0e66ca4daacc1ca Mon Sep 17 00:00:00 2001 From: Chip Black Date: Thu, 3 Mar 2011 02:40:58 -0800 Subject: [PATCH] Escape @ and #, as well; fix username in User.reload() --- www/js/blerg.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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); -- 2.25.1