jquery - apostrophe problems with twitter share url -


so realized apostrophes gives "&#39",

i have js following:

 $(document).ready(function () {         $('#share_buttont@(number)').click(function () {             var loc = $(this).attr('href');             window.open('http://twitter.com/share?url=' + loc + '&text=' + "@item.title. news via www.test.com" + '&', 'twitterwindow', 'height=450, width=550, top=' + ($(window).height() / 2 - 225) + ', left=' + $(window).width() / 2 + ', toolbar=0, location=0, menubar=0, directories=0, scrollbars=0');         });     }); 

if @item.title contains " 'flying' boat smash record? ", text apostrophes ruins text inside twitter share box. apostrophes turns &#39.

is there ways fix this, or need remove apostrophes on text? before js script triggers?


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -