mirror of
https://github.com/twisterarmy/twister-html.git
synced 2025-02-04 19:14:14 +00:00
Merge pull request #212 from austin-----/master
fix multi-byte character hashtag
This commit is contained in:
commit
90f169f138
@ -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)
|
||||
|
@ -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…
x
Reference in New Issue
Block a user