Problem with special characters like Spanish accents

Hi Wix Community!

I applied a code to a paragraph in order to make it collapse and expand on the site. It works very well but now I have a problem with the text. The paragraph is in Spanish and, as soon as I apply the code, the special characters like words with accents don’t read well.

For example: Instead of showing “Política” it displays “Política”.

Everything looks fine in the editor but gets bad when i got to preview or published mode. Any suggestions?

Thank you so much!


This is my code:

let fullText1; // variable to hold the full text
let shortText1; // variable to hold the short version of the text

$w.onReady( function () {
// how many characters to include in the shortened version
const shortText1Length = 500;
// read the full text and store it in the fullText variable
fullText1 = $w(“#mytext”).text;
// // grab the number of characters defined in shortTextLength and store them in the shortText variable
shortText1 = fullText1.substr(0, shortText1Length) + “…”;
// set the contents of the text element to be the short text
$w(“#mytext”).text = shortText1;

});

export function EPPEsm_click(event, $w) {
// if currently displaying short text, display the full text
if ($w(“#mytext”).text === shortText1) {
$w(“#mytext”).text = fullText1;
$w(“#mybutton”).label = “Show less”;
} else {
// if currently displaying full text, display the short text
$w(“#mytext”).text = shortText1;
$w(“#mybutton”).label = “Show more”;
}
}

Hi,
Can you please send us the site URL and a screenshot of the issue so that we can have a look?

Thanks,
Tal.

Hi, i have the same issue. Did you find a solution?

This issue has already been reported to QA and will hopefully be resolved soon.