Some fixes in creating permalinks from titles containing special characters