Fixed the wiki link replacement to handle spaces correctly.