| 12854 | } |
| 12855 | |
| 12856 | void url::set_hash(const std::string_view input) { |
| 12857 | if (input.empty()) { |
| 12858 | hash = std::nullopt; |
| 12859 | helpers::strip_trailing_spaces_from_opaque_path(*this); |
| 12860 | return; |
| 12861 | } |
| 12862 | |
| 12863 | std::string new_value; |
| 12864 | new_value = input[0] == '#' ? input.substr(1) : input; |
| 12865 | helpers::remove_ascii_tab_or_newline(new_value); |
| 12866 | hash = unicode::percent_encode(new_value, |
| 12867 | ada::character_sets::FRAGMENT_PERCENT_ENCODE); |
| 12868 | } |
| 12869 | |
| 12870 | void url::set_search(const std::string_view input) { |
| 12871 | if (input.empty()) { |
no test coverage detected