special characters replaced with unescaped characters on skuid ui page.

  • 1
  • Problem
  • Updated 2 weeks ago
  • Solved
Hi Team,

I am rendering a field as picklist using custom rerender, the value of the field can have special characters. So we are seeing issue while rendering the value on the skuid UI.

Value in stage is showing as below instead of RFP & Financial analysis

Stage : RFP & Financial analysis
Photo of Praveen Pannala

Praveen Pannala

  • 266 Points 250 badge 2x thumb

Posted 2 weeks ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 43,406 Points 20k badge 2x thumb
Are you using our Field Renderer API?  (See here:  https://docs.skuid.com/v11.1.1/en/skuid/api/skuid_ui.html?highlight=renderer#skuid-ui-field-renderer... ) .  These renderers should escape special characters correctly. 

If you are able to use a declarative solution by merging the field values in a tempalate  like this:  {{fieldName}} -- special characters should be escaped for you. 
Photo of Praveen Pannala

Praveen Pannala

  • 266 Points 250 badge 2x thumb
Am rendering the field using a custom snippet. Below is the javascript snippet running during render.

  var snippet = skuid.snippet,
    ui = skuid.ui;

snippet.registerSnippet("StageFieldRenderer", function(field,value, skipCondition){
if (field.mode === 'edit') {

//  Build the Options for the PICKLIST
var customOpts = [];
var playbookMasterObject = skuid.$M('Playbook');
var newProject = skuid.$M('Project');
skuid.$.each(playbookMasterObject.getRows(), function(i,row) {
if(skipCondition || (row.Client_Name__c === field.row.Account__r.Client_Name__c && row.Project_Type__c === field.row.Project_Type__c)){
value : row.Stage__c,         // Will be stored in target object 
label : row.Stage__c        // Will display in the PICKLIST

//  Render the options as a PICKLIST
var customSelect = skuid.ui.renderers.PICKLIST.edit({
entries : customOpts,
required : false,
value : value
}).change(function() {
   //  Update the row in the target object

//  Append the PICKLIST to the DOM element
} else {
//  If the mode is anything other than edit, display the field as Text
Photo of Praveen Pannala

Praveen Pannala

  • 266 Points 250 badge 2x thumb
@rob Can you please help me with this.