Skip to content

Commit

Permalink
improve code for flag display
Browse files Browse the repository at this point in the history
avoid dangerous @html
  • Loading branch information
eric-intuitem committed Feb 13, 2024
1 parent bfcacbd commit aed90f4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
$: display = LOCALE_DISPLAY_MAP[cell];
</script>

<span {...$$restProps}>{@html display}</span>
<span {...$$restProps}>{display}</span>
4 changes: 2 additions & 2 deletions frontend/src/lib/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ export const URN_REGEX =
/^urn:([a-zA-Z0-9_-]+):([a-zA-Z0-9_-]+):([a-zA-Z0-9_-]+)(?::([a-zA-Z0-9_-]+))?:(.+)$/;

export const LOCALE_DISPLAY_MAP = {
en: '&#127468&#127463; English',
fr: '&#127467&#127479; Français'
en: '🇬🇧 English',
fr: '🇫🇷 Français'
};

export const ISO_8601_REGEX =
Expand Down

0 comments on commit aed90f4

Please sign in to comment.