Job log regex does not properly handle single quotes in links

Summary

Issue: Job log regex does not properly handle single quotes in links

Current behavior: The job log regex used to parse links from job logs does not properly handle single quotes that are part of the link. For example, given the line "echo "blah blah 'https://example.invalid/foo' blah blah"", the link will be rendered as https://example.invalid/foo' instead of correctly as https://example.invalid/foo.

This can cause links to be rendered incorrectly or even broken in the job log output. The regex should be updated to properly ignore single quotes that are part of the link value.

Reported in customer ticket: Internal only

Similar to: !148891 (merged)


Description was generated using AI

Steps to reproduce

demo-job-log:
  image: bash:latest
  script:
    - echo "blah blah 'https://example.invalid/foo' blah blah"

Example Project

https://gitlab.com/shemgyll/job-log-test-shem/-/jobs/7070923941

What is the current bug behavior?

Given the line "echo "blah blah 'https://example.invalid/foo' blah blah"", the link will be rendered as https://example.invalid/foo' instead of correctly as https://example.invalid/foo.

What is the expected correct behavior?

Links should be rendered exluding single quote characters.

Output of checks

This bug happens on GitLab.com

Edited by Manuel Grabowski