ecosia / vue-safe-html

A Vue directive which renders sanitised HTML dynamically
Other
28 stars 4 forks source link

Add support for stripping all tags #98

Closed zcolleyz closed 1 year ago

zcolleyz commented 1 year ago

This PR adds the ability to render HTML entities without any HTML:

<template>
  <div v-safe-html:strip-tags="'<p><strong>Cats<strong> &amp; <em>&quot;Dogs&quot;</em></p>'" />
</template>

Renders to:

<div>Cats &amp; "Dogs"</div>

This behaviour will ignore any modifiers.

zcolleyz commented 1 year ago

We have no current need for this feature any more. If someone finds this you can either use the allowedTags option or restart the conversation for this feature and we'll go from there.