Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

abp.localize problem using quotes and other special characters #7075


User avatar
0
p.j.keukens created

Hi,

I'm using AspnetZero version 6.9 .Net Core + jquery and I'm having a problem with sweetalert or rather abp.localize.

When I localize a string containing a single or double quote, it doesn't render properly.

For example in my resource xml I've got this string (ps. here I've placed a space between the ampersand and the text otherwise it would render the quoate or single quote):

<text name="DocumentDeleteWarningMessage">Are you sure you want to delete document & quot;{0}& apos;?</text>

Now when I use

abp.localize(DocumentDeleteWarningMessage)

it shows "Are you sure you want to delete document \"test\u0027?"

It shows like this in the sweetalert box:

Using ' or " in the xml doesn't help as well it doesn't render properly.

Please help me to solve this problem as it is not very user friendly


2 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    I believe that upgrading abp(4.6) will solve it.

    https://github.com/aspnetboilerplate/aspnetboilerplate/pull/4459

  • User Avatar
    0
    p.j.keukens created

    yes, it seems like that did the trick.

    Thank you