CIRCLE_COMPARE_URL does not URL escape caret


#1

The environment variable CIRCLE_COMPARE_URL from https://circleci.com/docs/2.0/env-vars/#build-details can cause issues in other tools that expect the URL to be properly encoded.

The caret (^) is not a valid URL character from what I have read (https://www.drupal.org/node/353579).

Example: https://circleci.com/gh/mkobit/gradle-test-kotlin-extensions/26

The URL that is passed as the environment variable is https://github.com/mkobit/gradle-test-kotlin-extensions/compare/211a8ef37eb6^...3c546b55628a which contains the invalid caret.

I believe that Circle CI should escape the URL before setting it as an environment variable.

Related post in Gradle forum: https://discuss.gradle.org/t/build-scan-plugin-1-10-3-issue-when-using-a-url-with-a-caret/24965


#2