Fix for failing to unescape history properly, resulting in a backslash explosion
This commit is contained in:
parent
fd56465931
commit
f24a0170be
@ -643,6 +643,10 @@ void history_tests_t::test_history(void) {
|
||||
|
||||
/* Generate a value */
|
||||
wcstring value = wcstring(L"test item ") + format_val(i);
|
||||
|
||||
/* Maybe add some backslashes */
|
||||
if (i % 3 == 0)
|
||||
value.append(L"(slashies \\\\\\ slashies)");
|
||||
|
||||
/* Generate some paths */
|
||||
path_list_t paths;
|
||||
|
@ -287,6 +287,9 @@ static bool extract_prefix(std::string &key, std::string &value, const std::stri
|
||||
if (val_start < line.size() && line.at(val_start) == ' ')
|
||||
val_start++;
|
||||
value = line.substr(val_start);
|
||||
|
||||
unescape_yaml(key);
|
||||
unescape_yaml(value);
|
||||
}
|
||||
return where != std::string::npos;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user