Skip to content

fix(invite): preserve %20 in dial-in room query param#17195

Merged
damencho merged 2 commits intojitsi:masterfrom
nishant25kr:fix/invite-dialin-room-plus-encoding
Mar 23, 2026
Merged

fix(invite): preserve %20 in dial-in room query param#17195
damencho merged 2 commits intojitsi:masterfrom
nishant25kr:fix/invite-dialin-room-plus-encoding

Conversation

@nishant25kr
Copy link
Contributor

Summary

Fixes the alpha dial-in flow where rooms with spaces are rendered as test+room in static/dialInInfo.html.

Root cause

The dial-in URL is built with URLSearchParams, which encodes spaces in query params as +. The dial-in page later decodes the param for display, but decodeURIComponent does not convert + to spaces, so the UI renders test+room.

Fix

Preserve spaces as %20 in appendURLParam() by replacing + with %20 in the final URL string.

Repro

  1. Open https://alpha.jitsi.net/test room
  2. Join the meeting
  3. Click Invite peopleMore numbers
  4. Before fix: test+room
  5. After fix: test%20room

@jitsi-jenkins
Copy link

Hi, thanks for your contribution!
If you haven't already done so, could you please make sure you sign our CLA (https://jitsi.org/icla for individuals and https://jitsi.org/ccla for corporations)? We would unfortunately be unable to merge your patch unless we have that piece :(.

@nishant25kr
Copy link
Contributor Author

I’ve signed the Individual CLA. Please let me know if anything else is needed from my side.

@nishant25kr
Copy link
Contributor Author

Fixes #16958

@damencho
Copy link
Member

Have you checked all places where this is used and tested that this is not breaking anything? I don't think this is correct.

@nishant25kr
Copy link
Contributor Author

Hi @damencho,

I double-check the approach.

  • The dial-in URL is generated with URLSearchParams, which encodes spaces as +
  • On the dial-in page, we use decodeURIComponent, which does not convert + → space
  • This results in test+room being displayed instead of test room

My initial fix was to preserve %20 in appendURLParam, but I realize this might not be the best place to handle it and could have side effects in other usages of that helper.

Before proceeding further, I wanted to confirm the preferred approach:

Should we : Normalize the room value at the UI level (e.g. replace + with space before decoding)

@damencho
Copy link
Member

Should we : Normalize the room value at the UI level (e.g. replace + with space before decoding)

As it is known that the room name came from a url parameter then it just needs to be url decoded(decodeURIComponent).

@nishant25kr
Copy link
Contributor Author

I tried using only decodeURIComponent as suggested, but noticed that it doesn’t convert + to spaces:

decodeURIComponent("test+room") // "test+room"

In our case, spaces are encoded as +, so the UI still shows test+room.

Would it make sense to normalize + → space before decoding in this specific case, or should we ensure the room param is always encoded as %20 instead?

@damencho
Copy link
Member

You can use URLSearchParams to catch all cases for decoding.

@nishant25kr
Copy link
Contributor Author

I've updated the implementation to use URLSearchParams for retrieving the room value instead of manual decoding. This correctly handles both + and %20 cases without needing any additional normalization.

Also removed the previous change in appendURLParam to avoid affecting other usages.

Please let me know if this looks good!

@damencho
Copy link
Member

jenkins test this please

@damencho damencho merged commit ad82e55 into jitsi:master Mar 23, 2026
10 checks passed
@nishant25kr nishant25kr deleted the fix/invite-dialin-room-plus-encoding branch March 24, 2026 04:44
@nishant25kr
Copy link
Contributor Author

Hi @damencho,

Thanks again for the review and merge!

I’m planning to apply for GSoC with Jitsi this year and wanted to get your guidance. I’ve been contributing recently (3 PRs merged so far)

I wanted to ask:

  • Is there any specific area or issue type where contributions would be more valuable for GSoC preparation?
  • Any suggestions on how I can strengthen my proposal or contributions in the coming days?

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants