[QGIS-Developer] c++ QgsMessageLog::logMessage and escaping < and > chars

Richard Duivenvoorde rdmailings at duif.net
Fri Nov 6 13:31:41 PST 2020


Hi Devs,

I'm trying to debug some queries in the oracle provider.
They get logged in the QgsMessageLog, but often contain parts like " AND rownum <= 2"

Because the message log is a html-pane, these queries/messages are being truncated at the '<' or '>' character (I think as part of creating 'safe' html texts?)
I've seen this in python plugins too and there I search-replaced these myself.
But it is tedious to do that in every logMessage call.
But I was wondering if this could be done in QgsMessageLog itself? So in incoming messages the < and > are replaced by '<' ad '>' ?

Is this something easily done? Or is there something against this?

Regards,

Richard Duivenvoorde


More information about the QGIS-Developer mailing list