kartik-v / yii2-editable

An enhanced editable widget for Yii 2.0 that allows easy editing of displayed data with html inputs, widgets and more.
http://demos.krajee.com/editable
Other
112 stars 55 forks source link

htmlEncode escapes only string values #186

Closed kasparsklavins closed 5 years ago

kasparsklavins commented 5 years ago

Scope

This pull request includes a

Changes

The following changes were made (this change is also documented in the change log):

kasparsklavins commented 5 years ago

Are .min files updated automatically?

kartik-v commented 5 years ago
kasparsklavins commented 5 years ago

When using in combination with select2, and removing all selected options, $input.value is undefined. So, an undefined value is passed from here https://github.com/kartik-v/yii2-editable/blob/master/src/assets/js/editable.js#L201.

According to jquery docs, val() can return a string, a number, an array or undefined. replace() exists only on string values, so behaviour is not changed (unless someone depended on a TypeError being thrown)

I'll minify the file if no further changes are needed.

kasparsklavins commented 5 years ago

You can minify the JS files from here and submit.

k