fields.entityDecode

Since: Editor 1.5.3

Control the decoding of HTML entities in input elements.
Please note - this property requires the Editor extension for DataTables.

Description

The XSS protection that is built into Editor's PHP and .NET libraries can result in some characters being translated into HTML entities in order to ensure the security of your application. Not all characters will be automatically converted - for example you may wish to allow submission of simple HTML with b and i tags, but anything that is found to be potentially dangerous will be converted.

As a result, the encoded entities need to be converted back to their standard text form which shown in the editing form. This is done automatically by Editor - this option provides the ability to disable that behaviour. Typically it won't be required, but if you wish to show raw HTML entities to your end user, this option should be set to false.

Type

This option can be given in the following type(s):

Example

Disable decoding of HTML entities:

var editor = new DataTable.Editor({
	ajax: 'php/staff.php',
	table: '#myTable',
	fields: [
		{
			label: 'First name:',
			name: 'first_name',
			entityDecode: false
		}
	]
});