Verified Commit dc0c31bc authored by Valentin David's avatar Valentin David Committed by Thomas Haller

build/docs: fix generated XML syntax in tools/generate-docs-nm-settings-docs-gir.py

Class description may contains double quotes which is not valid as XML
attribute value.

[thaller@redhat.com: adjust original patch to reformat code with python black]
[thaller@redhat.com: adjusted patch during backport from nm-1-26 to nm-1-24]

!620
(cherry picked from commit 54e25f23)
(cherry picked from commit 7d267731)
(cherry picked from commit 2899343b)
parent aef7a0a6
Pipeline #207253 passed with stage
in 40 minutes and 49 seconds
......@@ -218,7 +218,14 @@ for settingxml in settings:
class_desc = get_docs(settingxml)
if class_desc is None:
raise Exception("%s needs a gtk-doc block with one-line description" % setting.props.name)
outfile.write(" <setting name=\"%s\" description=\"%s\" name_upper=\"%s\" >\n" % (setting.props.name, class_desc, get_setting_name_define (settingxml)))
outfile.write(
' <setting name="%s" description=%s name_upper="%s" >\n'
% (
setting.props.name,
xml_quoteattr(class_desc),
get_setting_name_define(settingxml),
)
)
setting_properties = { prop.name: prop for prop in GObject.list_properties(setting) if prop.name != 'name' }
if args.overrides is None:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment