Skip to content

Commit

Permalink
Merge pull request #59 from Multiplicom/bugfix/decode-edit-field-value
Browse files Browse the repository at this point in the history
Decode input control value before displaying
  • Loading branch information
michielvermeir committed Jun 26, 2019
2 parents 396919d + c4ee8c9 commit fa1789b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Controls/Controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

define([
"require", "jquery", "datetimepicker", "AXM/Externals/awesomplete/awesomplete", "_",
"AXM/AXMUtils", "AXM/DOM", "AXM/Icon", "AXM/Color", "AXM/Controls/Compound"
"AXM/AXMUtils", "AXM/DOM", "AXM/Icon", "AXM/Color", "AXM/Controls/Compound", "he"
],
function (
require, $, datetimepicker, awesomplete, _,
Expand Down Expand Up @@ -1279,6 +1279,8 @@ define([
* @returns {string}
*/
control.createHtml = function() {
var he = require("he");

var elementId = control._getSubId("");

var parentEl = DOM.Div();
Expand Down Expand Up @@ -1308,7 +1310,7 @@ define([
inputEl.addAttribute("type", "password");
}

inputEl.addAttribute("value", control._value);
inputEl.addAttribute("value", he.decode(control._value));
if (settings.placeHolder) {
inputEl.addAttribute("placeholder", settings.placeHolder);
}
Expand Down

0 comments on commit fa1789b

Please sign in to comment.