I was wondering why sometimes items with funky characters turn up and now I know how to reproduce it:
- Search for "Chris O'Doherty" -> https://www.wikidata.org/w/index.php?title=Special%3ASearch&profile=default&search=Chris+O%27Doherty&fulltext=Search
- Look at the "create a new item" link -> https://www.wikidata.org/w/index.php?title=Special:NewItem&label=Chris+O%26%2339%3BDoherty
- "Chris O'Doherty" <- oi, where did that funky stuff come from?
Looking https://www.wikidata.org/wiki/MediaWiki:Searchmenu-new this part probably causing the problems:
<span class="plainlinks">[{{fullurl:Special:CreateItem|label={{urlencode:$1}}}} create a new item]</span>
Would it be as simple as getting rid of the urlencode or would something else break?