Merge pull request #212 from austin-----/master

fix multi-byte character hashtag
This commit is contained in:
miguelfreitas 2014-12-07 17:24:01 -02:00
commit 90f169f138
2 changed files with 2 additions and 2 deletions

View File

@ -174,7 +174,7 @@ function openHashtagModal(e)
function openHashtagModalFromSearch(hashtag)
{
window.location.hash = '#hashtag?hashtag=' + hashtag;
window.location.hash = '#hashtag?hashtag=' + encodeURIComponent(hashtag);
}
function openHashtagModalFromSearchHandler(hashtag)

View File

@ -307,7 +307,7 @@ function requestHashtag(postboard,hashtag,resource, timeoutArgs) {
}
function processHashtag(postboard, hashtag, data) {
if( data && window.location.hash.indexOf(hashtag) != -1 ) {
if( data && window.location.hash.indexOf(encodeURIComponent(hashtag)) != -1 ) {
for( var i = data.length-1; i >= 0; i-- ) {
var userpost = data[i]["userpost"];
var key = userpost["n"] + ";" + userpost["time"];