special characters replaced with unescaped characters on skuid ui page.

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

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. 


Am rendering the field using a custom snippet. Below is the javascript snippet running during render.

(function(skuid,$){
  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)){
console.log(skipCondition);
customOpts.push({
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
field.model.updateRow(field.row,‘Stage__c’,skuid.$(this).val());
});

//  Append the PICKLIST to the DOM element
field.element.append(customSelect);
} else {
//  If the mode is anything other than edit, display the field as Text
skuid.ui.fieldRenderers.TEXTfield.mode;
}
});
}(skuid,skuid.$));
 



@rob Can you please help me with this.