Pre-receive hook error message not decoding HTML characters

Summary

A QA end to end test failed to validate text in the pre-receive hook error message; on investigation, the expected error message failed to validate because the UI was not decoding HTML escaped characters in the file path and user's name.

This has since been reproduced on a local GDK install with no feature flags enabled.

Steps to reproduce

The test in qa/specs/features/ee/browser_ui/3_create/repository/file_locking_spec.rb has been failing consistently recently in the Staging environment. Example job: https://ops.gitlab.net/gitlab-org/quality/staging/-/jobs/785425

The test performs the following steps:

  1. Create a project and merge request.
  2. Lock a file changed by the merge request.
  3. Sign in as a different user.
  4. Attempt to merge the MR.
  5. Observe the error message displayed.

What is the current bug behavior?

Some characters such as apostrophes in the pre-receive hook error message are displayed using their unicode hex values, e.g. '.

What is the expected correct behavior?

These characters should be decoded and displayed as intended, e.g. '

Relevant logs and/or screenshots

image

Output of checks

This bug happens on staging.gitlab.com and in the GDK; gitlab.com has not been checked yet, but it's likely to be occuring there as well.

Edited Dec 12, 2019 by Aleksandr Soborov
Assignee Loading
Time tracking Loading