Skip to content

Commit

Permalink
fix: Unencoded URIs.
Browse files Browse the repository at this point in the history
  • Loading branch information
vxern committed Nov 24, 2024
1 parent 35087a0 commit e163d46
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/constants/links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ interface Links {

const links: Links = {
definition: (word: string, options: ScraperOptions): string =>
`https://${options.siteLanguage}.wiktionary.org/wiki/${word}#${options.lemmaLanguage}`,
`https://${options.siteLanguage}.wiktionary.org/wiki/${encodeURIComponent(word)}#${encodeURIComponent(
options.lemmaLanguage,
)}`,
};

export type { Links };
Expand Down

0 comments on commit e163d46

Please sign in to comment.