[PR #5007] [CLOSED] fix(EffectiveURL.ts): add regex that replaces literal variable string… #5016

Closed
opened 2026-03-17 02:30:17 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/5007
Author: @yousefmarey12
Created: 4/17/2025
Status: Closed

Base: mainHead: 4672-whitespace-vars-codesnippet-generation


📝 Commits (3)

  • 916dbaf fix(EffectiveURL.ts): add regex that replaces literal variable strings with their value
  • bf910f7 Merge branch 'hoppscotch:main' into 4672-whitespace-vars-codesnippet-generation
  • 00beaaf fix(EffectiveURL.ts): reused a utility function, parseUrlAndPath, and removed my regex

📊 Changes

2 files changed (+11 additions, -1 deletions)

View changed files

.cz.toml (+6 -0)
📝 packages/hoppscotch-common/src/helpers/utils/EffectiveURL.ts (+5 -1)

📄 Description

Fix: #4672

First of all, this is a mainly a copy of another PR #4944. deleted the remote branch, and did not know that corresponding PRs would be deleted as well (new to using Git).

Problem

escaping << and >> does not happen when using variables in the request endpoint. For example, we have an environment variable var1=xyz 123. The request endpoint sent to the gql codegen would be http://abc.com/<<var1>> instead of http://abc.com/xyz+123. This was fixed using basic regular expressions.

Note to Reviewers

I deleted the unnecessary code in the old PR, and it worked.

Feel free to ask anything.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/5007 **Author:** [@yousefmarey12](https://github.com/yousefmarey12) **Created:** 4/17/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `4672-whitespace-vars-codesnippet-generation` --- ### 📝 Commits (3) - [`916dbaf`](https://github.com/hoppscotch/hoppscotch/commit/916dbaf9a5c05da151a2204257cc57a2c638be37) fix(EffectiveURL.ts): add regex that replaces literal variable strings with their value - [`bf910f7`](https://github.com/hoppscotch/hoppscotch/commit/bf910f76c3cae35253974daa9ec57808d733f2da) Merge branch 'hoppscotch:main' into 4672-whitespace-vars-codesnippet-generation - [`00beaaf`](https://github.com/hoppscotch/hoppscotch/commit/00beaaf37efc485cdc867af0a544dc6189e05620) fix(EffectiveURL.ts): reused a utility function, parseUrlAndPath, and removed my regex ### 📊 Changes **2 files changed** (+11 additions, -1 deletions) <details> <summary>View changed files</summary> ➕ `.cz.toml` (+6 -0) 📝 `packages/hoppscotch-common/src/helpers/utils/EffectiveURL.ts` (+5 -1) </details> ### 📄 Description Fix: [#4672](https://github.com/hoppscotch/hoppscotch/issues/4672) First of all, this is a mainly a copy of another PR [#4944](https://github.com/hoppscotch/hoppscotch/pull/4944#event-17308565656). deleted the remote branch, and did not know that corresponding PRs would be deleted as well (new to using Git). ### **Problem** escaping `<<` and `>>` does not happen when using variables in the request endpoint. For example, we have an environment variable var1=xyz 123. The request endpoint sent to the gql codegen would be `http://abc.com/<<var1>>` instead of `http://abc.com/xyz+123`. This was fixed using basic regular expressions. ### **Note to Reviewers** I deleted the unnecessary code in the old PR, and it worked. Feel free to ask anything. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 02:30:17 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#5016
No description provided.