[thelist] bbCode or HTML in DB?
Mark Howells
webdev at mountain.ch
Thu Oct 13 09:57:22 CDT 2005
> Should I translate the bbCode to HTML *before* storing it in the
> DB, so that the HTML tags are
> stored in the DB
I'd recommend not saving converted text in the database, unless it
contains actual HTML tags such as <img />. (For example, save
characters such as ä,ö,ü,& and so on as they are. That way, if the
need arises at some point in the future to export the text for
another medium - for example XML or raw text for Word - you won't
need to have a complex HTML conversion process to re-convert all of
the text. A system I work on uses this kind of formatting:
A word here is _underlined_ and *this* is bold. I'd like to insert an
image here:
[i150 400 300 "an image"]
...that makes sure that the input is totally cross-media compliant
(HTML, XML, Word, Quark, and so on...)
Best regards
Mark Howells
www.permanenttourist.ch
More information about the thelist
mailing list