Using the sed script from https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
https://gitlab.com/gitlab-org/gitlab-ce/issues/23036