jqgrid_utils 1.35.0 → 1.35.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -175,12 +175,16 @@ var jqu = new Jqgrid_utils({page:page});
175
175
  @returns {boolean} - true or false
176
176
  */
177
177
  is_html(str) {
178
+ let r = false;
178
179
  try {
179
180
  const doc = new DOMParser().parseFromString(str, "text/html");
180
- return true;
181
- } catch (err) {
182
- return false;
183
- }
181
+ const a = Array.from(doc.body.childNodes).some((n) => n.nodeType === 1);
182
+ console.log(a);
183
+ if (a) {
184
+ r = true;
185
+ }
186
+ } catch (err) {}
187
+ return r;
184
188
  }
185
189
 
186
190
  /**
package/jqgrid_utils.js CHANGED
@@ -174,12 +174,16 @@ var jqu = new Jqgrid_utils({page:page});
174
174
  @returns {boolean} - true or false
175
175
  */
176
176
  is_html(str) {
177
+ let r = false;
177
178
  try {
178
179
  const doc = new DOMParser().parseFromString(str, "text/html");
179
- return true;
180
- } catch (err) {
181
- return false;
182
- }
180
+ const a = Array.from(doc.body.childNodes).some((n) => n.nodeType === 1);
181
+ console.log(a);
182
+ if (a) {
183
+ r = true;
184
+ }
185
+ } catch (err) {}
186
+ return r;
183
187
  }
184
188
 
185
189
  /**
package/package.json CHANGED
@@ -30,7 +30,7 @@
30
30
  "test": "echo \"Error: no test specified\" && exit 1"
31
31
  },
32
32
 
33
- "version": "1.35.0"
33
+ "version": "1.35.1"
34
34
 
35
35
 
36
36
  }