diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index 1b03c3bc17d..56e107b04ef 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -136,7 +136,9 @@ inline void writeXMLCodeString(FTextStream &t,const char *s, int &col) case 11: case 12: case 13: case 14: case 15: case 16: case 17: case 18: case 19: case 20: case 21: case 22: case 23: case 24: case 25: case 26: case 27: case 28: case 29: case 30: case 31: - break; // skip invalid XML characters (see http://www.w3.org/TR/2000/REC-xml-20001006#NT-Char) + // encode invalid XML characters (see http://www.w3.org/TR/2000/REC-xml-20001006#NT-Char) + t << ""; + break; default: s=writeUtf8Char(t,s-1); col++; break; } } diff --git a/templates/xml/compound.xsd b/templates/xml/compound.xsd index 8affc20a5b7..efe14818b7e 100644 --- a/templates/xml/compound.xsd +++ b/templates/xml/compound.xsd @@ -279,12 +279,16 @@ - + + + + + diff --git a/testing/025/example_test_8cpp-example.xml b/testing/025/example_test_8cpp-example.xml index 96a1cd7876d..1e01cba166a 100644 --- a/testing/025/example_test_8cpp-example.xml +++ b/testing/025/example_test_8cpp-example.xml @@ -4,7 +4,7 @@ example_test.cpp This is an example of how to use the Test class. - More details about this example. voidmain(){Testt;t.example();} + More details about this example. voidmain(){constchar*a="Somespecialcharacterhere:";Testt;t.example();} diff --git a/testing/032/indexpage.xml b/testing/032/indexpage.xml index 3a252723943..1894ae4b58e 100644 --- a/testing/032/indexpage.xml +++ b/testing/032/indexpage.xml @@ -4,7 +4,7 @@ index My Project - Some text. voidmain(){Testt;t.example();} More text. voidmain(){Testt;t.example();} End. + Some text. voidmain(){constchar*a="Somespecialcharacterhere:";Testt;t.example();} More text. voidmain(){constchar*a="Somespecialcharacterhere:";Testt;t.example();} End. diff --git a/testing/example_test.cpp b/testing/example_test.cpp index f589023b3b2..a117b636c22 100644 --- a/testing/example_test.cpp +++ b/testing/example_test.cpp @@ -1,5 +1,7 @@ void main() { + const char* a = "Some special character here:  "; + Test t; t.example(); }