From 46de03632ee54aaaced5bd95a8ea846e9a4ed4ef Mon Sep 17 00:00:00 2001 From: Relintai Date: Sat, 6 Jan 2024 19:45:38 +0100 Subject: [PATCH] Use xml escape before writing classes to the docs file. --- tools/doc/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/doc/main.cpp b/tools/doc/main.cpp index 983f329..e0b3ece 100644 --- a/tools/doc/main.cpp +++ b/tools/doc/main.cpp @@ -68,7 +68,7 @@ String generate_section_class_list(const List &list, const String &cls_p continue; } - d += code_template.replace("$CODE$", c).replace("$NAME$", sname); + d += code_template.replace("$CODE$", c.xml_escape(true)).replace("$NAME$", sname); } return d; @@ -530,7 +530,7 @@ void process_file(const String &path) { String class_str = class_index[c]; //String class_name = get_structure_name(class_str); - index_str = index_str.replace(keyword, code_template.replace("$CODE$", class_str)); + index_str = index_str.replace(keyword, code_template.replace("$CODE$", class_str.xml_escape(true))); used_keywords.insert(c); }