summaryrefslogtreecommitdiff
path: root/src/bin/eolian_mono/eolian/mono/struct_definition.hh
diff options
context:
space:
mode:
authorJoão Paulo Taylor Ienczak Zanette <joao.tiz@expertisesolutions.com.br>2020-01-27 17:51:53 +0100
committerXavi Artigas <xavierartigas@yahoo.es>2020-01-27 17:56:06 +0100
commit5d982dd985c6ed58e71ae1132d247cc5b62c522b (patch)
tree488b49ac9a1e1ad300f523edc687ddef5cae9c68 /src/bin/eolian_mono/eolian/mono/struct_definition.hh
parentfdf0aee35c581489771e65c70e337728895c89e1 (diff)
csharp: Escape contents of struct fields' value tag.
Summary: In structs' definition, field `<value>` tags weren't scaping characters, so characters like "&" would lead to invalid XML errors. Fixes T8588. Test Plan: Run ninja test. Reviewers: segfaultxavi Reviewed By: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8588 Differential Revision: https://phab.enlightenment.org/D11202
Diffstat (limited to 'src/bin/eolian_mono/eolian/mono/struct_definition.hh')
-rw-r--r--src/bin/eolian_mono/eolian/mono/struct_definition.hh5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/struct_definition.hh b/src/bin/eolian_mono/eolian/mono/struct_definition.hh
index 1f4152aa74..48d69dc834 100644
--- a/src/bin/eolian_mono/eolian/mono/struct_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/struct_definition.hh
@@ -564,12 +564,13 @@ struct struct_definition_generator
564 // iterate struct fields 564 // iterate struct fields
565 for (auto const& field : struct_.fields) 565 for (auto const& field : struct_.fields)
566 { 566 {
567 if (!as_generator(documentation(indent.n + 1)).generate(sink, field, context)) 567 auto docs = documentation(indent.n + 1);
568 if (!as_generator(docs).generate(sink, field, context))
568 return false; 569 return false;
569 570
570 if (!field.type.doc_summary.empty()) 571 if (!field.type.doc_summary.empty())
571 { 572 {
572 if (!as_generator(indent << scope_tab << "/// <value>" << field.type.doc_summary << "</value>\n").generate(sink, attributes::unused, context)) 573 if (!docs.generate_tag_value(sink, field.type.doc_summary, context))
573 return false; 574 return false;
574 } 575 }
575 576