Browse Source

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

fix multi-byte character hashtag
master
miguelfreitas 10 years ago
parent
commit
90f169f138
  1. 2
      js/interface_common.js
  2. 2
      js/twister_actions.js

2
js/interface_common.js

@ -174,7 +174,7 @@ function openHashtagModal(e) @@ -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)

2
js/twister_actions.js

@ -307,7 +307,7 @@ function requestHashtag(postboard,hashtag,resource, timeoutArgs) { @@ -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"];

Loading…
Cancel
Save