Javascript Snippet Field Renderer Renders Quotes Incorrectly

  • 2
  • Problem
  • Updated 2 years ago
  • Solved
When using a snippet to render a field with Skuid's Javascript UI Field Renderer e.x. 
skuid.ui.fieldRenderers.TEXT.edit( arguments[0], arguments[1] );
it displays quotes as " (its HTML representation) and not as " (in the actual HTML its ")
Photo of Menachem Shanowitz

Menachem Shanowitz

  • 1,074 Points 1k badge 2x thumb

Posted 3 years ago

  • 2
Photo of Menachem Shanowitz

Menachem Shanowitz

  • 1,074 Points 1k badge 2x thumb
Any updates on this? We use the Javascript renderer quite a bit and any field with an apostrophe or quote is rendered incorrectly.

Thanks in advance!
(Edited)
Photo of Moshe Karmel

Moshe Karmel, Champion

  • 8,646 Points 5k badge 2x thumb
Try using the
skuid.utils.decodeHTML()
function.



From this link : http://help.skuid.com/m/11720/l/129517-skuid-utils
Photo of Velvel Marasow

Velvel Marasow

  • 452 Points 250 badge 2x thumb
The value passed in to the custom renderer is already HTML encoded, the console will throw you off as it decodes the HTML-encoded characters. As Moshe suggested above decode the HTML before calling the render function on it.