kazupon / vue-i18n

:globe_with_meridians: Internationalization plugin for Vue.js
https://kazupon.github.io/vue-i18n/
MIT License
7.28k stars 861 forks source link

[Vue3, Vite] Error if string value contain HTML and special characters #1678

Open cuong-nguyen opened 1 year ago

cuong-nguyen commented 1 year ago

Reporting a bug?

Hi. I am experiencing this issue

If the value contain HTML content (exactly shown below) string value:

"<p>\r\n    We will provide you with support if you experience problems or have questions. \r\n    Please contact us using email  <a href=\"support@company.com\">support@company.com</a>\r\n</p>\r\n\r\n<p>\r\n    Questions concerning products, price, customer agreements. \r\n</p>"

It points at the email part and reports the error

Message compilation error: Invalid linked format

It even forces the page to shut down after some time (please refer to reproduction link)

Appreciate any help!

Expected behavior

It would not error out

Reproduction

https://stackblitz.com/edit/vue-vqfhwk?file=src%2Fmain.js,src%2FApp.vue

System Info

MacOS Ventura
Edge browser

Screenshot

No response

Additional context

No response

Validations

Sepulven commented 12 months ago

+1.

Same issue with @ character. Unfortunately, I can't escape it therefore I can't have a message like : "Email to owner@gmail.com."

I'll keep getting the same error: Message compilation error: Unexpected lexical analysis in token: 'gmail.com'

And what the message that is going to be printed is: owner..

Any updates in this matter?

GeekKekeQiu commented 8 months ago

Any updates?

Sepulven commented 8 months ago

Any updates?

Sadly not.

marcdix commented 4 months ago

Concerning the @ character: https://github.com/kazupon/vue-i18n/issues/1358#issuecomment-894339617