Skip to content
Snippets Groups Projects

WIP: Remove duplicate escaping from branch dropdown

Closed username-removed-14714 requested to merge winniehell/gitlab-ce:ref-switch-escape into master
1 unresolved thread

What does this MR do?

Remove one of the two places where branch names are escaped from the switch branch dropdown.

Why was this MR needed?

Branch names were escaped twice such that switching branch didn't work for certain branch names (e.g. feature/#1234).

see also https://jsfiddle.net/mep7v3rz/

What are the relevant issue numbers?

fixes #21248 (closed), #20759 (closed)

cc @smcgivern

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
556 556 if (isInput) {
557 557 field = $(this.el);
558 558 } else {
559 field = this.dropdown.parent().find("input[name='" + fieldName + "'][value='" + value + "']");
  • Added 1 commit:

  • @alfredo1 Can you review please? :smiley:

  • username-removed-14714 Reassigned to @alfredo1

    Reassigned to @alfredo1

  • username-removed-14714 Resolved all discussions

    Resolved all discussions

  • username-removed-14714 Resolved all discussions

    Resolved all discussions

  • Added 1 commit:

  • Added 1 commit:

  • Several tests failing, not sure yet why. Looks like value is undefined.

  • username-removed-14714 Marked this merge request as a Work In Progress

    Marked this merge request as a Work In Progress

  • Added 1 commit:

  • Added 1 commit:

  • Added 35 commits:

  • username-removed-14714 Reassigned to @alfredo1

    Reassigned to @alfredo1

  • username-removed-14714 Unmarked this merge request as a Work In Progress

    Unmarked this merge request as a Work In Progress

  • Solved. :white_check_mark:

  • Added 470 commits:

  • username-removed-14714 Deleted source branch ref-switch-escape

    Deleted source branch ref-switch-escape

  • username-removed-14714 Target branch changed from master to multi-threading

    Target branch changed from master to multi-threading

  • username-removed-14714 Target branch changed from multi-threading to master

    Target branch changed from multi-threading to master

  • Added 1 commit:

  • username-removed-14714 Restored source branch ref-switch-escape

    Restored source branch ref-switch-escape

  • Added 1 commit:

    • cf42a3e6 - 1 commit from branch gitlab-org:master
  • mentioned in merge request !6237 (closed)

  • mentioned in issue #21880 (closed)

  • @winniehell will you be adding tests to this? :smile:

  • @ClemMakesApps That definitely makes sense! :thumbsup: Not sure when I will get that done though... :disappointed:

  • username-removed-14714 Marked this merge request as a Work In Progress

    Marked this merge request as a Work In Progress

  • @ClemMakesApps I find it very difficult to write tests for the dropdown because it encapsulates so much logic in it. If you know a way, feel free to replace this merge request by yours! :smiley:

  • Yeah, I was getting stuck on it too @winniehell. Perhaps we can add a new test case that has a value containing spaces? (If that's not already in there, I'm not 100% sure)

  • mentioned in merge request !6313 (merged)

  • !6313 (merged) does in fact fix this :) Thanks for making me check :')

  • Luke "Jared" Bennett Status changed to closed

    Status changed to closed

  • Please register or sign in to reply
    Loading