This commit is contained in:
Timothy Jaeryang Baek
2025-04-11 15:27:25 -07:00
parent c846a550fa
commit c5636ff68c
5 changed files with 49 additions and 13 deletions
@@ -87,6 +87,14 @@
showRelevance = calculateShowRelevance(citations);
showPercentage = shouldShowPercentage(citations);
}
const decodeString = (str: string) => {
try {
return decodeURIComponent(str);
} catch (e) {
return str;
}
};
</script>
<CitationsModal
@@ -117,7 +125,7 @@
<div
class="flex-1 mx-1 truncate text-black/60 hover:text-black dark:text-white/60 dark:hover:text-white transition"
>
{decodeURIComponent(citation.source.name)}
{decodeString(citation.source.name)}
</div>
</button>
{/each}
@@ -157,7 +165,7 @@
</div>
{/if}
<div class="flex-1 mx-1 truncate">
{decodeURIComponent(citation.source.name)}
{decodeString(citation.source.name)}
</div>
</button>
{/each}
@@ -194,7 +202,7 @@
</div>
{/if}
<div class="flex-1 mx-1 truncate">
{decodeURIComponent(citation.source.name)}
{decodeString(citation.source.name)}
</div>
</button>
{/each}