Commit f5961475 authored by Simon Knox's avatar Simon Knox

Merge branch '332246-no-more-enforcing-utf8' into 'master'

Shorten URLs in searches by deleting UTF-8 param from any forms

See merge request gitlab-org/gitlab!62820
parents 9e27f8a7 c697eb6e
......@@ -801,7 +801,7 @@ export default class FilteredSearchManager {
paths.push(`search=${sanitized}`);
}
let parameterizedUrl = `?scope=all&utf8=%E2%9C%93&${paths.join('&')}`;
let parameterizedUrl = `?scope=all&${paths.join('&')}`;
if (this.anchor) {
parameterizedUrl += `#${this.anchor}`;
......
# frozen_string_literal: true
# This file was introduced during upgrading Rails from 5.2 to 6.0.
# This file can be removed when `config.load_defaults 6.0` is introduced.
# Don't force requests from old versions of IE to be UTF-8 encoded.
Rails.application.config.action_view.default_enforce_utf8 = false
......@@ -185,7 +185,7 @@ describe('Filtered Search Manager', () => {
});
describe('search', () => {
const defaultParams = '?scope=all&utf8=%E2%9C%93';
const defaultParams = '?scope=all';
const defaultState = '&state=opened';
it('should search with a single word', (done) => {
......
......@@ -302,7 +302,6 @@ describe('Issuables list component', () => {
my_reaction_emoji: 'airplane',
scope: 'all',
state: 'opened',
utf8: '',
weight: '0',
milestone: 'v3.0',
labels: 'Aquapod,Astro',
......@@ -312,7 +311,7 @@ describe('Issuables list component', () => {
describe('when page is not present in params', () => {
const query =
'?assignee_username=root&author_username=root&confidential=yes&label_name%5B%5D=Aquapod&label_name%5B%5D=Astro&milestone_title=v3.0&my_reaction_emoji=airplane&scope=all&sort=priority&state=opened&utf8=%E2%9C%93&weight=0&not[label_name][]=Afterpod&not[milestone_title][]=13';
'?assignee_username=root&author_username=root&confidential=yes&label_name%5B%5D=Aquapod&label_name%5B%5D=Astro&milestone_title=v3.0&my_reaction_emoji=airplane&scope=all&sort=priority&state=opened&weight=0&not[label_name][]=Afterpod&not[milestone_title][]=13';
beforeEach(() => {
setUrl(query);
......@@ -356,7 +355,7 @@ describe('Issuables list component', () => {
describe('when page is present in the param', () => {
const query =
'?assignee_username=root&author_username=root&confidential=yes&label_name%5B%5D=Aquapod&label_name%5B%5D=Astro&milestone_title=v3.0&my_reaction_emoji=airplane&scope=all&sort=priority&state=opened&utf8=%E2%9C%93&weight=0&page=3';
'?assignee_username=root&author_username=root&confidential=yes&label_name%5B%5D=Aquapod&label_name%5B%5D=Astro&milestone_title=v3.0&my_reaction_emoji=airplane&scope=all&sort=priority&state=opened&weight=0&page=3';
beforeEach(() => {
setUrl(query);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment