[thelist] bbCode or HTML in DB?

Brooking, John John.Brooking at sappi.com
Thu Oct 13 09:07:09 CDT 2005


   Here's a best practices question that I would love to hear some input
on. I have started building some database-driven websites that allow
basic formatting via "bbCode". I've just realized that I haven't really
thought through the following design decision: Should I translate the
bbCode to HTML *before* storing it in the DB, so that the HTML tags are
stored in the DB, or should I store the bbCode in the DB and translate
it to HTML after retrieval? Are there more security issues one way than
the other? Any other considerations? (I suppose it's more efficient to
do the translation once on the way in rather than every time on the way
out.) Or doesn't it matter? Any articles I should read? (I don't seem to
have found the right combination of keywords to Google this question
   Thanks for any thoughts.
- John

This message may contain information which is private, privileged or confidential and is intended solely for the use of the individual or entity named in the message. If you are not the intended recipient of this message, please notify the sender thereof and destroy / delete the message. Neither the sender nor Sappi Limited (including its subsidiaries and associated companies) shall incur any liability resulting directly or indirectly from accessing any of the attached files which may contain a virus or the like.

More information about the thelist mailing list