Quote Originally Posted by hobbyist View Post
Afaik, QTextEdit::toHtml() always returns valid html (see qDebug() << textEdit->toHtml() for the actual content).

Perhaps domDoc->setContent(textEdit->toPlainText()) is what you are looking for?
Doesn't seem to do any validation either...brackets or no brackets, it's happy!