Field renderer causing Apostrophe to turn into "'"

  • 2
  • Question
  • Updated 2 years ago
  • Answered
Hi,

Prob a very basic question, but I use the snippet below to highlight text field in a table and for some reason it causes the Apostrophe to turn into "'"

From what i found on another post, I have to use the unescaped value, but not really sure how to do that :(

In case anyone can help, Here's snippet:

var field = arguments[0],

    value = arguments[1];



skuid.ui.fieldRenderers[field.metadata.displaytype][field.mode](field,value);


field.element.css({'background-color':'red','min-height':'30px'});


Thank you
Photo of Dave

Dave

  • 5,538 Points 5k badge 2x thumb

Posted 2 years ago

  • 2
Photo of Velvel Marasow

Velvel Marasow

  • 172 Points 100 badge 2x thumb
You'll need to use the skuid utils decodeHTML method to convert the encoded HTML back to readable text. The text is HTML encoded when it gets passed to skuid.
value = skuid.utils.decodeHTML(arguments[1]);
Photo of Dave

Dave

  • 5,538 Points 5k badge 2x thumb
Thank you very much, that worked perfectly!