fix encoding issues with link conversion