Rich text formatting probleme

Hello,

I added a little code that shows only a small part of a description text in the repeater, this is the code :

 $w.onReady(function () {

const shortTextLength = 120;
let fullText;
let shortText;
$w('#repeater1').onItemReady(() => {
$w("#repeater1").forEachItem(($w, item) => {
fullText = $w('#dataset1').getCurrentItem().description;
if (!fullText.length) {
$w('#text10').collapse();
} else if (fullText.lenght <= shortTextLength) {
$w('#text10').text = fullText;
} else {
shortText = fullText.substr(0, shortTextLength) + "...";
$w('#text10').text = shortText;
}
});
});
})

And its working fine, the only problem is that the description "rich text " looks like that after using the code :

Do you know how to fix it ?
Thank you.

…Same