Index: openacs-4/packages/acs-templating/acs-templating.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/acs-templating.info,v diff -u -r1.30 -r1.31 --- openacs-4/packages/acs-templating/acs-templating.info 25 Apr 2004 15:09:51 -0000 1.30 +++ openacs-4/packages/acs-templating/acs-templating.info 6 May 2004 21:38:20 -0000 1.31 @@ -7,7 +7,7 @@ t t - + OpenACS Templating library. 2004-04-18 @@ -26,7 +26,7 @@ layout of a site can be more easily administered. - + @@ -41,7 +41,7 @@ - + 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)