patelneel1994 / x2js

Automatically exported from code.google.com/p/x2js
0 stars 0 forks source link

IE8 and text nodes #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. processing xml with 'mixed' nodes (text nodes), eg :

<stuff>
  <things>some value</things> 
  some text here
</stuff>

What is the expected output? What do you see instead?
- works fine in a 'proper browser' ;-)

in IE8 : causes "Object doesn't support this property or method"

What version of the product are you using? On what operating system and
browser version?

Latest, and IE8

Please provide any additional information below.

- tracked the issue to line 199 :

>>>
if ( result.__cnt > 1 && result.__text!=null && 
config.skipEmptyTextNodesForObj) {
   if(result.__text.trim()=="") {  // HERE IS THE PROBLEM
<<<

- ".trim()" doesn't exist on String.prototype in IE8 - suggest a new method, or 
a polyfill for IE8

Cheers

Chris

Original issue reported on code.google.com by catdna1...@googlemail.com on 23 Oct 2013 at 12:24

GoogleCodeExporter commented 9 years ago
Oh dear lord IE :(
thanks anyway!
I'll fix it

Original comment by abdulla....@gmail.com on 23 Oct 2013 at 6:15

GoogleCodeExporter commented 9 years ago
Fixed in v1.1.4 (available in VCS)

Original comment by abdulla....@gmail.com on 23 Oct 2013 at 6:55

GoogleCodeExporter commented 9 years ago
1.1.4 is released

Original comment by abdulla....@gmail.com on 3 Jan 2014 at 9:00