Looks like what your doing here is encoding the title before it goes into the database!
i would not do this way, instead do not encode data for DB but encode it as your looping the results to the page, or even better add an extra column called slug.
so you have in title "Some Clean Title Here
" and in the slug column you have "some-clean-title-here
" so then you use $row['slug']
then in your look use
<a href="site_root.tld/post/<?=$row['slug']?>"><?=$row['title'];?></a>
Always escape your data with mysql_real_escape_string and use a function that dont just urlencode the slug on db entry but also creates a sleek elegant safe formatted string.
the best form for a slig is a-zA-Z0-9 - _
only.