Tags: qgis2web/qgis2web
Tags
Safely load Qt .ui and avoid defusedxml patching #1207 #1208 #1209 Add a safe loader for Qt .ui files that temporarily removes potentially polluting XML modules (e.g. lxml, defusedxml, xml.etree.*) from sys.modules before importing qgis.PyQt.uic.loadUiType, then restores them. Move FORM_CLASS initialization to use this safe loader and ensure package path is appended. Also remove the global call to defusedxml.defuse_stdlib() in olStyleScripts.py to avoid altering stdlib XML behavior. These changes prevent third-party XML libraries from breaking uic.loadUiType while preserving module state.
PreviousNext