0

Does anyone know how to fix this one.

In Aura component (Apex - Salesforce) in .cmp, I have these lines of code:

<aura:if isTrue="{!chat.Number == message.Number}">
     {!message.value}
</aura:if>

The problem is once when it try to show message.value, it convert ' (apostrophe), " (quotes)..into &#39, &quot...

So, for example, instead of showing He hasn't.. it shows He hasn&#39t..

I want to show '(apostrophe) instead of &#39 and etc.

Thanks!

2

You can use your {!message.value} inside Lightning formatted richtext to resolve the problem. e.g.

<lightning:formattedRichText value="{!message.value}"/>

1
  • Thanks, it works.
    – mhdev
    Sep 22 at 14:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.