Trim backticks in the end of URL.

GitOrigin-RevId: bcb9d7e60044f940de940b7eac4cd3279966cc47
This commit is contained in:
levlam 2018-01-15 17:11:27 +03:00
parent 8eb46f6715
commit 2702806a89

View File

@ -404,7 +404,7 @@ static vector<Slice> match_urls(Slice str) {
}
};
Slice bad_path_end_chars(".:;,('?!");
Slice bad_path_end_chars(".:;,('?!`");
while (true) {
auto dot_pos = str.find('.');
@ -783,7 +783,7 @@ Slice fix_url(Slice str) {
break;
}
}
Slice bad_path_end_chars(".:;,('?!");
Slice bad_path_end_chars(".:;,('?!`");
while (path_pos > 0 && bad_path_end_chars.find(path[path_pos - 1]) < bad_path_end_chars.size()) {
path_pos--;
}