Index: openacs-4/packages/acs-templating/tcl/richtext-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/richtext-procs.tcl,v diff -u -r1.16 -r1.17 --- openacs-4/packages/acs-templating/tcl/richtext-procs.tcl 4 Mar 2004 18:41:54 -0000 1.16 +++ openacs-4/packages/acs-templating/tcl/richtext-procs.tcl 6 May 2004 21:38:20 -0000 1.17 @@ -207,7 +207,27 @@ -default 0] } + # Check browser's User-Agent header for compatibility with htmlArea if { $htmlarea_p } { + set user_agent [string tolower [ns_set get [ns_conn headers] User-Agent]] + if { [string first "opera" $user_agent] != -1 } { + # Opera - doesn't work, even though Opera claims to be IE + set htmlarea_p 0 + } elseif { [regexp {msie ([0-9]*)\.([0-9]+)} $user_agent matches major minor] } { + # IE, works for browsers > 5.5 + if { $major < 5 || ($major == 5 && $minor < 5) } { + set htmlarea_p 0 + } + } elseif { [regexp {gecko/0*([1-9][0-9]*)} $user_agent match build] } { + if { $build < 20030210 } { + set htmlarea_p 0 + } + } else { + set htmlarea_p 0 + } + } + + if { $htmlarea_p } { # Tell the blank-master to include the special stuff for htmlArea in the page header global acs_blank_master__htmlareas lappend acs_blank_master__htmlareas $attributes(id)