Don't apply htmlentities
over the whole link, but on the values you actually want to escape, like this
$sub = htmlentities(substr($row['content'],0,300), ENT_QUOTES, 'UTF-8') . '.......... <a href="blogpost.php?id=' . htmlentities($row['id'], ENT_QUOTES,'UTF-8') .'">See full article</a>';
echo $sub;