We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
in storphe.private.js, the code below does not work in Internet Explorer 9-10.
_textToXml: function( text ){ var doc = null; try { if( window.DOMParser ){ var parser = new DOMParser(); doc = parser.parseFromString( text, 'text/xml'); } else { doc = new ActiveXObject("MSXML2.DOMDocument"); doc.async = false; doc.loadXML(text); } ... },
I think that parser.parseFromString seems to be throwing an exception. I make some workaround this problem:
_isIE : function() { var myNav = navigator.userAgent.toLowerCase(); return (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : false; }, _isPlainText : function(text){ return !/<[^>]*>((.|[\n\r])*)<\/[^>]+>/.test(text); }, _textToXml: function( text ){ var doc = null; /* IE는 plain text를 parseFromString의 인자로 전달하면 exception 발생함. */ if( this._isIE() && this._isPlainText() ){ return null; } try { if( window.DOMParser ){ var parser = new DOMParser(); doc = parser.parseFromString( text, 'text/xml'); } else { doc = new ActiveXObject("MSXML2.DOMDocument"); doc.async = false; doc.loadXML(text); } } catch(e) { throw { type: 'Parse error', message: "No DOM parser object found." }; } var error = doc.getElementsByTagName("parsererror"); if( error.length > 0 ){ return null; } if(doc.body == null){ return null; } var node = document.importNode( doc.documentElement, true ); return node; },
The text was updated successfully, but these errors were encountered:
The Strophe.js plugins repo has moved to https://github.com/strophe/strophejs-plugins
Sorry, something went wrong.
No branches or pull requests
in storphe.private.js, the code below does not work in Internet Explorer 9-10.
I think that parser.parseFromString seems to be throwing an exception.
I make some workaround this problem:
The text was updated successfully, but these errors were encountered: