SQLite Forum

.mode html fails on html content
Login
The whole point of html mode, csv mode, TCL mode, SQL insert mode, etc is that **values from the database are rendered in a way that survives passage through a subsequent html rendering, csv output, TCL dequoting, interpretation as SQL, etc.**  The html mode is not what you want to pass DB content that is to remain as it is.  There are modes that will do that.  If you wish to surround such output with stuff that is HTML markup, the .print meta-command can do that.

It's not quite clear what all you envision the shell doing, but it is not intended as a do-it-all, general purpose utility.  It is extremely useful for doing the simple things when used within (external) scripts to do more grand things. The fact that it helps a little with those grander tasks is not reason to think it should have an ever-growing feature set designed to accept ever-more-complex inputs and produce a never-to-be-done set of complex outputs.  That's what programming languages are for.