[#80966] Opera supports xhtml and handles namespaces properly but it breaks jQuery.attr(), so xhtml_browser return False if the webbrowser is opera
authorStephanie Marcu <stephanie.marcu@logilab.fr>
Wed, 28 Jan 2009 14:48:23 +0100
changeset 495 f8b1edfe9621
parent 494 c47229797d0d
child 496 e25a3c2f5393
[#80966] Opera supports xhtml and handles namespaces properly but it breaks jQuery.attr(), so xhtml_browser return False if the webbrowser is opera
web/request.py
--- a/web/request.py	Wed Jan 28 13:07:14 2009 +0100
+++ b/web/request.py	Wed Jan 28 14:48:23 2009 +0100
@@ -640,7 +640,11 @@
     
     def xhtml_browser(self):
         useragent = self.useragent()
-        if useragent and ('MSIE' in useragent or 'KHTML' in useragent):
+        # MSIE does not support xml content-type
+        # quick fix: Opera supports xhtml and handles namespaces
+        # properly but it breaks jQuery.attr()
+        if useragent and ('MSIE' in useragent or 'KHTML' in useragent
+                          or 'Opera' in useragent):
             return False
         return True