Fix wikipedia's apostrophe issue
![]() ![]() |
Change line 100 from; new Element('a').set({'href':result.Url,'target':'_blank'}).set({'text' : 'View Entry'}).inject(text); to new Element('a').set({'href':result.Url.replace(/?/g, "'"),'target':'_blank'}).set({'text' : 'View Entry'}).inject(text); Now instead of the wikipedia 'View Entry' link failing whenever you are looking up an item that includes an apostrophe, it'll actually send you to the correct page. |
![]() ![]() |
ah bugger, it seems the comment has removed the EXACT part that this fix addresses, where it says; replace(/?/g, it should show replace(/&ap os;/g, BUT REMOVE THE SPACE between 'ap' and 'os' so it's all one continuous word |
![]() ![]() |
so it's like this; new Element('a').set({'href':result.Url.replace(/&ap os;/g, "'"),'target':'_blank'}).set({'text' : 'View Entry'}).inject(text); but obviously remove the space between ap and os |

