Data-i18n property not properly converting label value

Hi

Create a label (I’m using BS5) and include a single apostrophe within the text and then take a look at the data-i18n property once published.

For example, I entered:

Label 'hello'

as the value of Label1 and this is what I came across when I inspected that element:

<span id="Label1" style="font-family:inherit;border-radius:0px;" class="text-primary collapse show" data-i18n="Label " hello''>Label 'hello'</span>

Just thought you’d like to know.

Thanks.

This result doesn’t surprise me. Quotes signs have special meaning in code, so when they get embedded in a string you can get unexpected results.

Have you figured out a workaround?

Why not include the single quotes as they are within the double quotes?

<span id="Label1" style="font-family:inherit;border-radius:0px;" class="text-primary collapse show" data-i18n="Label 'hello'">Label 'hello'</span>