Skip to content

Commit

Permalink
Fix post test
Browse files Browse the repository at this point in the history
  • Loading branch information
scaron committed May 7, 2015
1 parent 3a105aa commit 4cc502e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/jquery.prettyPhoto.js
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@
function getHashtag(){
var url = location.href;
hashtag = (url.indexOf('#prettyPhoto') !== -1) ? decodeURI(url.substring(url.indexOf('#prettyPhoto')+1,url.length)) : false;
hashtag = hashtag.replace(/<|>/g,'');
if(hashtag){ hashtag = hashtag.replace(/<|>/g,''); }
return hashtag;
};

Expand Down

1 comment on commit 4cc502e

@fmp777
Copy link

@fmp777 fmp777 commented on 4cc502e Sep 9, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: Character class is significantly faster than single character alteration

if(hashtag){  hashtag = hashtag.replace(/[<>]/g,''); }

Please sign in to comment.