Skip to content

Commit

Permalink
Merge pull request #2063 from candela97/fix-html-formaturl
Browse files Browse the repository at this point in the history
Avoid escaping reserved characters when formatting URL
  • Loading branch information
tfedor authored Nov 19, 2024
2 parents 1cf80b1 + f1a7070 commit 681b005
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/Core/Html/Html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default class HTML {
static formatUrl(link: string): string {
const protocolReg = /^[a-z]+:\/\//;
const _link = protocolReg.test(link) ? link : `//${link}`;
return this.escape(_link);
return encodeURI(_link);
}

static escape(str: string): string {
Expand Down

0 comments on commit 681b005

Please sign in to comment.