The Wayback Machine - https://web.archive.org/web/20201104184739/https://github.com/kazupon/vue-i18n/issues/594
Skip to content
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

Docs idea: Make HTML binding with v-html less prevalent #594

Open
blimmer opened this issue Jun 6, 2019 · 1 comment
Open

Docs idea: Make HTML binding with v-html less prevalent #594

blimmer opened this issue Jun 6, 2019 · 1 comment

Comments

@blimmer
Copy link

@blimmer blimmer commented Jun 6, 2019

Being a newer user to vue-i18n, I accidentally was using the unsafe v-html binding solution after reading the docs on HTML Formatting. Going back through the docs, I now noticed the big warning at the top suggesting using component interpolation.

What do you think about showing an example of component interpolation under the HTML formatting section (https://kazupon.github.io/vue-i18n/guide/formatting.html#html-formatting) and de-emphasizing the v-html binding option, calling it out as an unsafe solution again before the example?

I think my eyes usually jump right to code examples and I skipped right over the big warning blocks that suggest component interpolation.

I'm happy to create a PR to improve the docs, but wanted feedback on the idea before I took the time to put together a PR.

@kissu
Copy link

@kissu kissu commented Nov 16, 2019

Or at least use dom-purify-html instead of the unsafe v-html yeah. 😸

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants
You can’t perform that action at this time.