From 75af9ca7272540379434eda75b91369c62f3a5a8 Mon Sep 17 00:00:00 2001 From: Michael M Date: Fri, 27 Oct 2023 15:13:55 +0200 Subject: [PATCH] fix: replace all occurrences in path parameter sanitization --- .../ng-openapi-gen/src/templates/requestBuilder.handlebars | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/ng-openapi-gen/src/templates/requestBuilder.handlebars b/packages/ng-openapi-gen/src/templates/requestBuilder.handlebars index 64def08..6b30aa6 100644 --- a/packages/ng-openapi-gen/src/templates/requestBuilder.handlebars +++ b/packages/ng-openapi-gen/src/templates/requestBuilder.handlebars @@ -122,9 +122,9 @@ class PathParameter extends Parameter { // @ts-ignore serializeValue(value: any, separator = ','): string { var result = typeof value === 'string' ? encodeURIComponent(value) : super.serializeValue(value, separator); - result = result.replace('%3D', '='); - result = result.replace('%3B', ';'); - result = result.replace('%2C', ','); + result = result.replace(/%3D/g, '='); + result = result.replace(/%3B/g, ';'); + result = result.replace(/%2C/g, ','); return result; } }