Forum OpenACS Development: Re: Safari 3.0 and XinHA

Collapse
3: Re: Safari 3.0 and XinHA (response to 1)
Posted by Michael Totschnig on
One of our users accessing our site with safari got an error generated by the safari check in richtext-procs.

The User-Agent string his version of Safari sends is:
"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.2.149.27 Safari/525.13"

The following code seems to look for the string "version", and chokes here, since it is not find. I do not know what would be the best way to fix this.

if {[string first "safari" $user_agent] != -1} {
regexp {version/([0-9]+)[.]} $user_agent _ user_agent_version
if {$user_agent_version < 3} {
set element(htmlarea_p) false
}
}

Collapse
4: Re: Safari 3.0 and XinHA (response to 3)
Posted by Michael Totschnig on
In fact, it is Google Chrome that was sending this User-Agent header.