Fix [#173] by encoding # in uri and unescaping

This commit is contained in:
reality 2013-01-21 19:22:52 +00:00
parent 1958db6df1
commit dd9962d465
2 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ var pages = function(dbot) {
'/users/:connection/:channel': function(req, res) {
var connection = req.params.connection;
var channel = '#' + req.params.channel;
var channel = _.unescape(req.params.channel);
var connections = dbot.instance.connections;
if(connections.hasOwnProperty(connection) &&

View File

@ -6,5 +6,5 @@ block content
a(href='/connections') « Connection List
ul#quotelist
-each channel in channels
a(href='/users/'+connection+'/'+channel.substr(1,channel.length))
a(href='/users/'+connection+'/'+encodeURIComponent(channel))
li.quotes #{channel}