Changeset 887

Show
Ignore:
Timestamp:
2007-09-27 01:18:17 (14 months ago)
Author:
wwalc
Message:

Enabling Safari and Opera compatibility in Python integration file.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/fckeditor.py

    r132 r887  
    2424import cgi 
    2525import os 
     26import re 
    2627import string 
    2728 
     
    125126                                return True 
    126127                        return False 
     128                elif (sAgent.find("Opera/") >= 0): 
     129                        i = sAgent.find("Opera/") 
     130                        iVersion = float(sAgent[i+6:i+6+4]) 
     131                        if (iVersion >= 9.5): 
     132                                return True 
     133                        return False 
     134                elif (sAgent.find("AppleWebKit/") >= 0): 
     135                        p = re.compile('AppleWebKit\/(\d+)', re.IGNORECASE) 
     136                        m = p.search(sAgent) 
     137                        if (m.group(1) >= 522): 
     138                                return True 
     139                        return False 
    127140                else: 
    128141                        return False