Browse Source

Fix #2098

Example with escape set to false:
https://jsfiddle.net/djhvscf/dsn41bt0/3/
Example with escape set to true:
https://jsfiddle.net/djhvscf/dsn41bt0/4/
Dennis Hernández 9 years ago
parent
commit
8030c68728
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/bootstrap-table.js

+ 3 - 1
src/bootstrap-table.js

@@ -1220,7 +1220,9 @@
                 this.options.customSearch.apply(this, [this.searchText]);
                 return;
             }
-            var s = this.searchText && this.searchText.toLowerCase();
+
+            var s = !this.options.escape ? this.searchText && escapeHTML(this.searchText).toLowerCase()
+                                            : this.searchText && this.searchText.toLowerCase();
             var f = $.isEmptyObject(this.filterColumns) ? null : this.filterColumns;
 
             // Check filter