webkit-xmlview-plugin icon indicating copy to clipboard operation
webkit-xmlview-plugin copied to clipboard

XMLView plugin is eating my XML responses of XHR...

Open apinstein opened this issue 14 years ago • 5 comments

I can't quite tell if this is the same issue as the one with the XML/XSL sheets, but I think not, since it doesn't seem to happen with JSON...

So, one of my web apps returns content-type text/xml from an AJAX call. It seems that XMLView is grabbing that content and replacing it with:

This is what's returned by the xhrResponseObject.responseText, instead of the xml returned by the server. This obviously breaks the app.

Is there a way to not have XMLView process the data if it isn't the "top level" content of the window?

Thanks, Alan

apinstein avatar Mar 30 '11 18:03 apinstein

I'll need to reproduce that somehow, is there an URL where I can see it in effect?

liyanage avatar Mar 30 '11 20:03 liyanage

You have to be logged in... do you want me to setup a demo where you can see it happen?

On Mar 30, 2011, at 4:28 PM, liyanage wrote:

I'll need to reproduce that somehow, is there an URL where I can see it in effect?

Reply to this email directly or view it on GitHub: https://github.com/liyanage/webkit-xmlview-plugin/issues/11#comment_938112

apinstein avatar Mar 30 '11 21:03 apinstein

Yes, please. Not though that I don't have a lot of time so I might not be able to produce a fix soon. So if setting up the demo is a lot of work you might want to wait.

liyanage avatar Mar 30 '11 21:03 liyanage

Demo here:

http://admin.showcasere.com/webapp/container

If you don't get to it before i do another deploy it'll disappear, so LMK if it's not there.

Just click "Open Dialog" then hit submit. If you do this on a Safari w/XMLViewer, the form will disappear due to the bug. If you do this with XMLViewer disabled, the form will not change (actually it will be sent back to the browser in a text/xml response and re-displayed.

Good luck.

Alan

On Mar 30, 2011, at 5:12 PM, liyanage wrote:

Yes, please. Not though that I don't have a lot of time so I might not be able to produce a fix soon. So if setting up the demo is a lot of work you might want to wait.

Reply to this email directly or view it on GitHub: https://github.com/liyanage/webkit-xmlview-plugin/issues/11#comment_938312

apinstein avatar Mar 31 '11 02:03 apinstein

I checked it out, an it appears to me that you're not actually doing an XHR, you are really doing a form submit, and the server responds with text/xml. This response is not consumed as an XHR response, but instead rendered to the screen, as is the case for a form submission. The new content replaces the old form, and in this case Safari lets the xml view plugin handle/render the content.

If the request were really XHR, Safari would not invoke the plugin, even for responses with content type text/xml. Lots and lots of sites would break otherwise.

liyanage avatar Mar 31 '11 02:03 liyanage