diff options
author | albert-github <albert.tests@gmail.com> | 2019-06-16 17:22:41 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2019-06-16 17:22:41 (GMT) |
commit | d167351779132a7c85d92954e497b19d3a223bbd (patch) | |
tree | 06b9a54135f2d4d8c57be833dbf74b2f3ab7293f /src | |
parent | 4628578fe856f3ccfe3ade8f702671bfa1854566 (diff) | |
download | Doxygen-d167351779132a7c85d92954e497b19d3a223bbd.zip Doxygen-d167351779132a7c85d92954e497b19d3a223bbd.tar.gz Doxygen-d167351779132a7c85d92954e497b19d3a223bbd.tar.bz2 |
(X)HTML warning when `[` or `]` in constructed ids
When we have a construct like:
```
template <typename Element, size_t N>
class StlContainerView<Element[N]> {
public:
typedef internal::NativeArray<RawElement> type;
};
```
this will lead to files with `[` and `]` in it, as such not nice, but it is used in ids inside the code as well like:
```
id="aclass_stl_container_view_3_01_element[_n]_4_html_a1bf60158ff15896f2b53af11c09524fb"
```
running
```
xmllint --path ..../testing/dtd --noout --nonet --postvalid html_org/*html
```
this leads to the message:
```
Syntax of value for attribute id of div is not valid
Document html_org/test_8h_source.html does not validate
```
escaping the `[` and `]` as done with other special characters solves this problem
Diffstat (limited to 'src')
-rw-r--r-- | src/util.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/util.cpp b/src/util.cpp index 338b10c..fa973ba 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -5479,6 +5479,8 @@ QCString escapeCharsInString(const char *name,bool allowDots,bool allowUnderscor case '$': growBuf.addStr("_0B"); break; case '\\': growBuf.addStr("_0C"); break; case '@': growBuf.addStr("_0D"); break; + case ']': growBuf.addStr("_0E"); break; + case '[': growBuf.addStr("_0F"); break; default: if (c<0) { |