reuben.m-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Apr-10 21:19 UTC
AJAX and non-xml entities
Recently I made some changes so that I am serving up XHTML 1.1. I''m talking about real XHTML where the mime type is changed to application/ xhtml+xml and firefox raises hell when there are errors rather then trying to work around it. I have a page that uses AJAX to update a div in the page, and I ran into a problem that I didn''t have when serving using the text/html mime type. The content that was passed back from the AJAX request contained the "nbsp" html entity and firefox raised an error saying that "nbsp" is not a valid xml entity. So my question is how many other html entities are not valid when passed as xml, and how do I properly send AJAXed content that contains any such entity? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
reuben.m-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Apr-10 21:28 UTC
Re: AJAX and non-xml entities
I forgot to ask, is there anyway have the server include a dtd or xmlns tag within the xml response to AJAX requests so that this doesn''t cause problems? If not, shouldn''t rails be automatically converting entities like this to something that is xml compatable like "& # 1 6 0 ;" --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
2007/4/11, reuben.m-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <reuben.m-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>: <...> So my question is how many other html entities are not valid when> passed as xml, and how do I properly send AJAXed content that contains > any such entity?I will not count how many are not valid, but only these firve are safe: & ' < > " Regards, Rimantas -- http://rimantas.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---