[QGIS-Developer] HTML in plugin's metadata.txt works, but should it?

Johannes Kröger (WhereGroup) johannes.kroeger at wheregroup.com
Tue Nov 28 02:05:57 PST 2023


Hi!

https://docs.qgis.org/3.34/en/docs/pyqgis_developer_cookbook/plugins/plugins.html#metadata-txt 
says for the fields "about", "description" and "changelog": "no HTML 
allowed"

But actually we *can* use some HTML 
(https://doc.qt.io/qt-5/richtext-html-subset.html I assume).
The plugin's information will be nicely rendered at least in QGIS' 
plugin manager.
<img> does not seem to work, it just shows a placeholder. Clicking an 
<a> makes the plugin manager display a white page and open my system's 
web browser with the URL. But other formatting things work well.

Example image: 
https://matrix.osgeo.org/_matrix/media/r0/download/matrix.wheregroup.com/nKHOTGcYWWpYqQKNWaSjuFbu/html%20in%20metadata.txt.png

It would be super useful for me in a non-public plugin so I wonder:

- Does "no HTML allowed" refer to the display in the official plugin 
repository https://plugins.qgis.org only?
- Is it a bug that we can use some HTML in those fields or can we rely 
on it for the future?

I am a bit torn between "oh yay, we can add some more detailed 
information in a nicely formatted way" and "oh dear lord this might lead 
to complex chaos in plugin descriptions".

Cheers, Hannes



More information about the QGIS-Developer mailing list