That's not correct. Firstly, you should strip slashes before applying htmlspecialchars(). Next, you should only strip slashes if magic_quotes_gpc is on (and best practice states that it should be off).
As such, you could define:
function stripSlashesIfNeeded($str) {
return get_magic_quotes_gpc() ? stripslashes($str) : $str;
}
Then use it:
echo htmlspecialchars(stripSlashesIfNeeded($_SESSION['jobinfo']), ENT_QUOTES);
Note that the ENT_QUOTES argument is unnecessary if you use double quotes to delimit HTML attribute values.