LeSuisse/vue-dompurify-html

content in v-dompurify-html are removed when changing route

yong123liang opened this issue · 5 comments

When routing to the other pages, the content in <div v-dompurify-html="myContent"></div> is removed (disappeared), is there a way to prevent this behavior? (v-html does not remove the content while routing)

Hi,

Do you have a reproduction scenario for the issue?

Yes. Initialize content:{} in data(). In the created hook, assign content with {content:'> from server'}. When routing to another page, the content in <div v-dompurify-html="content"></div> will disappear.

I'm still not able to reproduce.

What version of vue-dompurify-html are you using?
Would you mind opening a PR against https://github.com/LeSuisse/vue-dompurify-html-issue-98 demonstrating the issue?

Please verify the PR, thanks :)

Thanks for the report.

Fix published in v2.1.1