Skip to content

Commit

Permalink
#9717 Use v-strip-unsafe-html instead of v-html
Browse files Browse the repository at this point in the history
  • Loading branch information
blesildaramirez committed Feb 16, 2025
1 parent ec02e2d commit 334df67
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions templates/submission/review-publication-field.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<div
class="submissionWizard__reviewPanel__item__value"
{if $type === 'html'}
v-html="publication.{$localizedProp|escape}
v-strip-unsafe-html="publication.{$localizedProp|escape}
? publication.{$localizedProp|escape}
: '{translate key="common.noneProvided"}'"
{/if}
Expand All @@ -54,7 +54,7 @@
{translate key="common.noneProvided"}
</template>
{elseif $type === 'html'}
{* empty. see v-html above *}
{* empty. see v-strip-unsafe-html above *}
{else}
<template v-if="publication.{$localizedProp|escape}">
{{ publication.{$localizedProp|escape} }}
Expand Down
4 changes: 2 additions & 2 deletions templates/submission/wizard.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</template>
<template v-if="localize(publication.title)">
<span class="app__breadcrumbsSeparator" aria-hidden="true">/</span>
<span v-html="localize(publication.title)">
<span v-strip-unsafe-html="localize(publication.title)">
</template>
</div>
<h1 class="app__pageHeading" ref="pageTitle">
Expand Down Expand Up @@ -66,7 +66,7 @@
<panel-section v-for="section in step.sections" :key="section.id">
<template #header>
<h2>{{ section.name }}</h2>
<div v-html="section.description" />
<div v-strip-unsafe-html="section.description" />
</template>
<pkp-form
v-if="section.type === 'form'"
Expand Down
2 changes: 1 addition & 1 deletion templates/workflow/submissionIdentification.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@

<span
class="pkpWorkflow__identificationTitle"
v-html="localizeSubmission(currentPublication.fullTitle, currentPublication.locale)"
v-strip-unsafe-html="localizeSubmission(currentPublication.fullTitle, currentPublication.locale)"
>
</span>

0 comments on commit 334df67

Please sign in to comment.