The disadvantage with the escape for now, not for later approach is simple. If you save a user's post to the database, then that user's post is displayed 2,000 times there will be some serious differences. Under the approach I reccomend the post will be escaped with mysql_real_escape_string() once, and with htmlentiteis() 2,000 times. If you had escaped it twice in the first place those functions would have been called once each, saving you 1,999 calls to htmlentities.
You will need to balance your security concerns with performance needs.
Note: This blog post was written well in advance, I'm on vacation, don't have my laptop or internet, and it's likely that my cell phone won't even turn on. So replies may be a bit tardy.
Note^2: But I'm not dumb, someone's looking after my server
Comments »
Doing htmlentities before it goes into the database makes your database data very html centric. If you ever switch to publishing to other mediums, that will be slightly more difficult.
As you get traffic, there are a bunch of ways optimize. One of them is caching. You can cache on the htmlspecialchars() level by storing the result of htmlspecialchars() in a separate caching field in the database (besides storing the unescaped values for searching and other purposes).
It usually turns out however that caching is not the most efficient on the htmlspecialchars() level but on upper levels like the caching of whole blocks on a page. I think this is why the efficiency of htmlspecialchars() is not really an issue. From the technology point of view it is, but from the POV of a business, it doesn't really worth to spend your precious time and attention on it.

Paul Reinheimer, one of two behind the funcaday website (providing details ...
Tracked: Jan 07, 14:14