Commit 0b1870e
authored
Rollup merge of rust-lang#81379 - GuillaumeGomez:improve-urls, r=Nemo157
Improve URLs handling
Fixes rust-lang#81330.
Explanations: before this PR, when emptying the search input, we still had `?search=` in the URL, which wasn't very nice. Now, if the search is empty, we drop the `?search=` part.
Also, I realized while working on this PR that when we clicked on a menu link when we were on the search results, the search parameters would look like: `?search=#the-anchor`, which was super weird. Now, it looks like this: `?search=the-search#the-anchor`.
Also, I didn't use the `Url` very nice API because it's not available in any IE version (sadness...).
cc `````@lzutao`````
r? `````@Nemo157`````1 file changed
+17
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
94 | 99 | | |
95 | 100 | | |
96 | 101 | | |
| |||
252 | 257 | | |
253 | 258 | | |
254 | 259 | | |
255 | | - | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
256 | 263 | | |
257 | 264 | | |
258 | 265 | | |
| |||
1810 | 1817 | | |
1811 | 1818 | | |
1812 | 1819 | | |
| 1820 | + | |
| 1821 | + | |
1813 | 1822 | | |
1814 | | - | |
| 1823 | + | |
1815 | 1824 | | |
1816 | | - | |
| 1825 | + | |
1817 | 1826 | | |
1818 | 1827 | | |
1819 | 1828 | | |
| |||
1922 | 1931 | | |
1923 | 1932 | | |
1924 | 1933 | | |
1925 | | - | |
| 1934 | + | |
| 1935 | + | |
1926 | 1936 | | |
1927 | 1937 | | |
1928 | 1938 | | |
| |||
2779 | 2789 | | |
2780 | 2790 | | |
2781 | 2791 | | |
2782 | | - | |
2783 | | - | |
2784 | | - | |
| 2792 | + | |
| 2793 | + | |
| 2794 | + | |
2785 | 2795 | | |
2786 | 2796 | | |
2787 | 2797 | | |
| |||
0 commit comments