Skip to content

add "mark safe" filter that translates mustache binding into v-html instead of v-text #143

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jcaxmacher opened this issue Feb 27, 2014 · 3 comments

Comments

@jcaxmacher
Copy link

It would be useful to have a filter that allows the user to mark a mustache binding as safe:

<span>{{ myText | safe }}</span>

would become:

<span v-html="myText"></span>
@bpierre
Copy link

bpierre commented Feb 27, 2014

You can do this with the triple mustaches:

<span>{{{myText}}}</span>

See http://vuejs.org/guide/#mustache-bindings

@yyx990803
Copy link
Member

^ what @bpierre said

@jcaxmacher
Copy link
Author

Ooops. Thanks :)

Hanks10100 pushed a commit to Hanks10100/vue that referenced this issue May 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants