4 ms·
I'm trying really hard not to scoff. This is pretty much a standard way of doing any sort of embedded content in any templating system or language that has ever
by drivebyacct2 14y ago
I'm trying really hard not to scoff. This is pretty much a standard way of doing any sort of embedded content in any templating system or language that has ever existed. Ever.
I'd recommend running the child HTML through some sort of validation to clean up the markup or otherwise ensure it doesn't alter the content that follows it in the template.
Also, depending on your userbase, it may be easier, or actually recommended, to use something like Markdown instead. It won't let them shoot themselves in the foot like HTML or a rich text editor will. I've seen content that was heavily formatted and styled that looked atrocious in the template, do to the template's parental styling or just poor user taste.