I have a custom post type called "employees" (I'm using Custom Post Type UI plugin). I've created few posts of "employees" type. For getting link to post I'm using this code:
$original_permalink = get_permalink($original_post_id);
...
<a href="<?=$original_permalink?>"><?=RU_LINK?></a>
When I follow this link I get 404 error and URL like this: http://site.local/employees/lana/%E2%80%8E
I read that the reason is copy/paste of post title from MS Word or something like this, but I wrote titles manually. So this is not the reason. When I do code like this
echo $original_permalink = get_permalink($original_post_id);
I get correct URL. And when I see page code (Ctrl+U) it's correct too.
By the way, when I've created posts of default type ("post") such problems were not observed. What the reason for such behavior?