diff options
author | albert-github <albert.tests@gmail.com> | 2021-04-08 08:41:28 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2021-04-08 08:41:28 (GMT) |
commit | 4048d7e0ee3fb73bef0b5496a6046af37102aa79 (patch) | |
tree | f12aa758254da0c5e8285c26d979fae022abb963 /src | |
parent | 6f2aae9b7b13946aa9c676684694b3869a65c959 (diff) | |
download | Doxygen-4048d7e0ee3fb73bef0b5496a6046af37102aa79.zip Doxygen-4048d7e0ee3fb73bef0b5496a6046af37102aa79.tar.gz Doxygen-4048d7e0ee3fb73bef0b5496a6046af37102aa79.tar.bz2 |
issue #8485 The browser based search doesn't handle underscores correctly
The problem is that that "_" is seen as an Id character and not is escaped for JS search.
This is a regression on:
```
Commit: a4ecbee86766b35d25d41d1a178806e1688485df [a4ecbee]
Date: Monday, March 22, 2021 8:02:06 PM
issue #8375: Lowercase search does not find non-ASCII uppercase pages and vice versa
```
and
```
Commit: 3a365ab230cab40910366eee5352534719541598 [3a365ab]
Date: Wednesday, March 24, 2021 8:34:50 PM
issue #8375 Lowercase search does not find non-ASCII uppercase pages and vice versa (part 2)
```
Diffstat (limited to 'src')
-rw-r--r-- | src/searchindex.cpp | 2 | ||||
-rw-r--r-- | src/util.h | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/searchindex.cpp b/src/searchindex.cpp index 9afb7cb..cd048c4 100644 --- a/src/searchindex.cpp +++ b/src/searchindex.cpp @@ -555,7 +555,7 @@ QCString searchId(const Definition *d) TextStream t; for (size_t i=0;i<s.length();i++) { - if (isId(s[i])) + if (isIdJS(s[i])) { t << s[i]; } @@ -191,6 +191,10 @@ inline bool isId(int c) { return c=='_' || c>=128 || c<0 || isalnum(c); } +inline bool isIdJS(int c) +{ + return c>=128 || c<0 || isalnum(c); +} QCString removeRedundantWhiteSpace(const QCString &s); |