Refreshing page adds duplicate labels in scoped issue boards

What's the bug

Refreshing issue boards page adds duplicate label filters.

Cause

A faulty url params parsing causes the bug such as when labels are scoped or contain spaces.

Reproduction

  1. Enable :graphql_board_lists FF.

  2. Visit any issue boards and scope the current board to a SCOPED label or labels that contain spaces such as 1st contribution

  3. Refresh the page.

Example project

  • In regular issue boards

https://gitlab.com/groups/gitlab-org/plan-stage/-/boards/2668025?label_name[]=1st%20contribution

  • With epic swimlanes

https://gitlab.com/groups/gitlab-org/plan-stage/-/boards/2668025?label_name[]=1st%20contribution&group_by=epic

Demo

Screen_Recording_2021-04-26_at_7.43.08_AM

Edited by euko