How can I render (html & css) stored in the database, i.e. a template written by the user?
- How can I render it?
- How can I make sure that it is safe?
How can I render (html & css) stored in the database, i.e. a template written by the user?
Mostly you can’t, this is why it’s not really a good practice to accept HTML written by end users. Instead, provide some other end user templating mechanism.