@@ -100,7 +100,7 @@ TEST(Suggestions, specialCharHandling)
100
100
{
101
101
// HTML special symbols (<, >, &, ", and ') must be HTML-escaped
102
102
// Backslash symbols (\) must be duplicated.
103
- const std::string SYMBOLS (R"( \<>&'"~!@#$%^*()_+`-=[]{}|:;,.?)" );
103
+ const std::string SYMBOLS (" \t\n\r " R"( \<>&'"~!@#$%^*()_+`-=[]{}|:;,.?)" );
104
104
{
105
105
kiwix::Suggestions s;
106
106
s.add (zim::SuggestionItem (" Title with " + SYMBOLS,
@@ -110,10 +110,10 @@ TEST(Suggestions, specialCharHandling)
110
110
CHECK_SUGGESTIONS (s.getJSON (),
111
111
R"EXPECTEDJSON( [
112
112
{
113
- "value" : "Title with \\<>&'"~!@#$%^*()_+`-=[]{}|:;,.?",
114
- "label" : "Snippet with \\<>&'"~!@#$%^*()_+`-=[]{}|:;,.?",
113
+ "value" : "Title with \u0009\u0010\u0013\ \<>&'"~!@#$%^*()_+`-=[]{}|:;,.?",
114
+ "label" : "Snippet with \u0009\u0010\u0013\ \<>&'"~!@#$%^*()_+`-=[]{}|:;,.?",
115
115
"kind" : "path"
116
- , "path" : "Path with \\<>&'"~!@#$%^*()_+`-=[]{}|:;,.?"
116
+ , "path" : "Path with \u0009\u0010\u0013\ \<>&'"~!@#$%^*()_+`-=[]{}|:;,.?"
117
117
}
118
118
]
119
119
)EXPECTEDJSON"
@@ -128,10 +128,10 @@ R"EXPECTEDJSON([
128
128
CHECK_SUGGESTIONS (s.getJSON (),
129
129
R"EXPECTEDJSON( [
130
130
{
131
- "value" : "Snippetless title with \\<>&'"~!@#$%^*()_+`-=[]{}|:;,.?",
132
- "label" : "Snippetless title with \\<>&'"~!@#$%^*()_+`-=[]{}|:;,.?",
131
+ "value" : "Snippetless title with \u0009\u0010\u0013\ \<>&'"~!@#$%^*()_+`-=[]{}|:;,.?",
132
+ "label" : "Snippetless title with \u0009\u0010\u0013\ \<>&'"~!@#$%^*()_+`-=[]{}|:;,.?",
133
133
"kind" : "path"
134
- , "path" : "Path with \\<>&'"~!@#$%^*()_+`-=[]{}|:;,.?"
134
+ , "path" : "Path with \u0009\u0010\u0013\ \<>&'"~!@#$%^*()_+`-=[]{}|:;,.?"
135
135
}
136
136
]
137
137
)EXPECTEDJSON"
@@ -145,8 +145,8 @@ R"EXPECTEDJSON([
145
145
CHECK_SUGGESTIONS (s.getJSON (),
146
146
R"EXPECTEDJSON( [
147
147
{
148
- "value" : "text with \\<>&'"~!@#$%^*()_+`-=[]{}|:;,.? ",
149
- "label" : "containing 'text with \\<>&'"~!@#$%^*()_+`-=[]{}|:;,.?'...",
148
+ "value" : "text with \u0009\u0010\u0013\ \<>&'"~!@#$%^*()_+`-=[]{}|:;,.? ",
149
+ "label" : "containing 'text with \u0009\u0010\u0013\ \<>&'"~!@#$%^*()_+`-=[]{}|:;,.?'...",
150
150
"kind" : "pattern"
151
151
//EOLWHITESPACEMARKER
152
152
}
0 commit comments