Skip to content

Commit

Permalink
Fix hostname replacement in rokka.render.getUrlFromUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
chregu committed Mar 6, 2023
1 parent bbf4f2d commit 9cdb484
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 3.13.2 - [06-03-2023]

- Fix hostname replacement in `rokka.render.getUrlFromUrl`

# 3.13.1 - [01-03-2023]

- Put variables into ?v when long or have a space in it
Expand Down
6 changes: 5 additions & 1 deletion src/apis/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,11 @@ export default (state: State): { render: Render } => {
}

const renderHostUrl = new URL(state.renderHost)
const replaceHost = renderHostUrl.host.replace('{organization}', '')

const replaceHost = decodeURIComponent(renderHostUrl.host).replace(
'{organization}',
'',
)
return render.getUrl(
url.hostname.replace(replaceHost, ''),
components.hash,
Expand Down

0 comments on commit 9cdb484

Please sign in to comment.