Skip to content

Commit 00e63d7

Browse files
committed
fix(ui): using the decodeHtmlEntities instead of v-html
1 parent 3097b23 commit 00e63d7

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

app/components/Compare/PackageSelector.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,9 @@ function handleFocus() {
306306
<span
307307
v-if="result.description"
308308
class="text-xs text-fg-muted truncate mt-0.5 w-full block"
309-
v-html="result.description"
310-
/>
309+
>
310+
{{ decodeHtmlEntities(result.description) }}
311+
</span>
311312
</ButtonBase>
312313
</div>
313314
</Transition>

app/components/Package/TableRow.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,9 @@ const allMaintainersText = computed(() => {
6868
<td
6969
v-if="isColumnVisible('description')"
7070
class="py-2 px-3 text-sm text-fg-muted max-w-xs truncate"
71-
v-html="pkg.description || '-'"
72-
/>
71+
>
72+
{{ decodeHtmlEntities(pkg.description || '-') }}
73+
</td>
7374

7475
<!-- Downloads -->
7576
<td

0 commit comments

Comments
 (0)