GH Actions removes scheme from logged https URLs

This had me scratching my head for a long time, as I thought the output of my script running in GH Actions was different to my local machine. It turns out, GH Actions mangles https URLs in the output logs by removing the scheme from them altogether.

I think the output of logs in GH Actions should reflect exactly what is logged to stdout/in. At least, as much as possible, and it seems entirely possible to leave https URLs intact.

For example:

name: Example
on:
  push:
  workflow_dispatch:
jobs:
  echo_url:
    name: Echo URL
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Echo https
        run: echo "https://github.com"

Output as it appears in GitHub Actions UI:

image

What I would expect to see is something like:

> Run echo "https://github.com"
https://github.com

I can see in the page source that the https is being stripped. This is the anchor element for the second “github.com” anchor in the image above:

<a target="_blank" rel="noopener noreferrer" href="https://github.com">github.com</a>

As you can see, the href attribute is correct, but the text inside the anchor is not.

Note: AFAICT this behaviour doesn’t apply to http URLs.

Thanks