Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
to
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
matrix
to
Commits
f08c1206
Unverified
Commit
f08c1206
authored
2 years ago
by
Thibault Martin
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #272 from matrix-org/t3chguy-patch-1
Fix over-encoding issues in Element URIs
parents
c39e7e1f
58f63c4a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/open/clients/Element.js
+6
-6
6 additions, 6 deletions
src/open/clients/Element.js
with
6 additions
and
6 deletions
src/open/clients/Element.js
+
6
−
6
View file @
f08c1206
...
...
@@ -52,16 +52,16 @@ export class Element {
let
fragmentPath
;
switch
(
link
.
kind
)
{
case
LinkKind
.
User
:
fragmentPath
=
`user/
${
link
.
identifier
}
`
;
fragmentPath
=
`user/
${
encodeURIComponent
(
link
.
identifier
)
}
`
;
break
;
case
LinkKind
.
Room
:
fragmentPath
=
`room/
${
link
.
identifier
}
`
;
fragmentPath
=
`room/
${
encodeURIComponent
(
link
.
identifier
)
}
`
;
break
;
case
LinkKind
.
Group
:
fragmentPath
=
`group/
${
link
.
identifier
}
`
;
fragmentPath
=
`group/
${
encodeURIComponent
(
link
.
identifier
)
}
`
;
break
;
case
LinkKind
.
Event
:
fragmentPath
=
`room/
${
link
.
identifier
}
/
${
link
.
eventId
}
`
;
fragmentPath
=
`room/
${
encodeURIComponent
(
link
.
identifier
)
}
/
${
encodeURIComponent
(
link
.
eventId
)
}
`
;
break
;
}
...
...
@@ -77,9 +77,9 @@ export class Element {
if
(
isWebPlatform
&&
trustedWebInstances
.
includes
(
link
.
webInstances
[
this
.
id
]))
{
instanceHost
=
link
.
webInstances
[
this
.
id
];
}
return
`https://
${
instanceHost
}
/#/
${
encodeURIComponent
(
fragmentPath
)
}
`
;
return
`https://
${
instanceHost
}
/#/
${
fragmentPath
}
`
;
}
else
if
(
platform
===
Platform
.
Linux
||
platform
===
Platform
.
Windows
||
platform
===
Platform
.
macOS
)
{
return
`element://vector/webapp/#/
${
encodeURIComponent
(
fragmentPath
)
}
`
;
return
`element://vector/webapp/#/
${
fragmentPath
}
`
;
}
else
{
return
`element://
${
fragmentPath
}
`
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment