[APM] Fix problems with tilde in transaction name (#33309) (#33369)

This commit is contained in:
Søren Louv-Jansen 2019-03-18 11:57:12 +01:00 committed by GitHub
parent 276790d777
commit ced3b9f237
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -103,7 +103,10 @@ export const KibanaLink = withLocation(KibanaLinkComponent);
// It was supposedly fixed in https://github.com/angular/angular.js/commit/1b779028fdd339febaa1fff5f3bd4cfcda46cc09 but still seeing the issue
export function legacyEncodeURIComponent(url) {
return (
url && encodeURIComponent(url.replace(/\//g, '~2F').replace(/ /g, '~20'))
url &&
encodeURIComponent(url)
.replace(/~/g, '%7E')
.replace(/%/g, '~')
);
}