Skip to content

Commit

Permalink
Use sanitize to clean network html snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
Morgan Brown committed Dec 4, 2024
1 parent cc1e1b8 commit 80faf3e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/lib/flows/claim-project-flow/steps/review/review.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import filterCurrentChainData from '$lib/utils/filter-current-chain-data';
import network from '$lib/stores/wallet/network';
import { mapSplitsFromListEditorData } from '$lib/components/splits/utils';
import sanitize from 'sanitize-html';
const dispatch = createEventDispatcher<StepComponentEvents>();
Expand Down Expand Up @@ -249,8 +250,13 @@
>You can <span class="typo-text-bold">collect your tokens</span> from your
<span class="typo-text-bold">Drips dashboard</span>.</UlIconLi
>
<UlIconLi icon={TokenStreamsIcon}
>{@html network.settlement.recipientsExplainerHtml}</UlIconLi
<UlIconLi icon={TokenStreamsIcon}>
{@html sanitize(network.settlement.recipientsExplainerHtml, {
allowedTags: ['span'],
allowedAttributes: {
span: ['class'],
},
})}</UlIconLi
>
</ul>
</div>
Expand Down

0 comments on commit 80faf3e

Please sign in to comment.