annotate MoinMoin/web/static/htdocs/applets/FCKeditor/fckeditor.pl @ 5144:12d27670e274

merged moin/1.8
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 14 Sep 2009 02:47:11 +0200
parents wiki/htdocs/applets/FCKeditor/fckeditor.pl@287faf79876f wiki/htdocs/applets/FCKeditor/fckeditor.pl@a6461afbc0ce
children 9c27b8589342
rev   line source
5130
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
1 #####
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
2 # FCKeditor - The text editor for Internet - http://www.fckeditor.net
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
3 # Copyright (C) 2003-2009 Frederico Caldeira Knabben
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
4 #
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
5 # == BEGIN LICENSE ==
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
6 #
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
7 # Licensed under the terms of any of the following licenses at your
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
8 # choice:
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
9 #
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
10 # - GNU General Public License Version 2 or later (the "GPL")
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
11 # http://www.gnu.org/licenses/gpl.html
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
12 #
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
13 # - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
14 # http://www.gnu.org/licenses/lgpl.html
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
15 #
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
16 # - Mozilla Public License Version 1.1 or later (the "MPL")
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
17 # http://www.mozilla.org/MPL/MPL-1.1.html
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
18 #
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
19 # == END LICENSE ==
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
20 #
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
21 # This is the integration file for Perl.
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
22 #####
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
23
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
24 #my $InstanceName;
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
25 #my $BasePath;
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
26 #my $Width;
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
27 #my $Height;
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
28 #my $ToolbarSet;
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
29 #my $Value;
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
30 #my %Config;
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
31
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
32 sub FCKeditor
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
33 {
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
34
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
35 local($instanceName) = @_;
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
36 $InstanceName = $instanceName;
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
37 $BasePath = '/fckeditor/';
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
38 $Width = '100%';
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
39 $Height = '200';
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
40 $ToolbarSet = 'Default';
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
41 $Value = '';
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
42 }
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
43
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
44 sub Create
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
45 {
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
46 print &CreateHtml();
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
47 }
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
48
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
49 sub specialchar_cnv
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
50 {
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
51
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
52 local($ch) = @_;
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
53
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
54 $ch =~ s/&/&amp;/g; # &
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
55 $ch =~ s/\"/&quot;/g; #"
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
56 $ch =~ s/\'/&#39;/g; # '
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
57 $ch =~ s/</&lt;/g; # <
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
58 $ch =~ s/>/&gt;/g; # >
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
59 return($ch);
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
60 }
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
61
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
62 sub CreateHtml
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
63 {
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
64
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
65 $HtmlValue = &specialchar_cnv($Value);
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
66 $Html = '' ;
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
67 if(&IsCompatible()) {
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
68 $Link = $BasePath . "editor/fckeditor.html?InstanceName=$InstanceName";
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
69 if($ToolbarSet ne '') {
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
70 $Link .= "&amp;Toolbar=$ToolbarSet";
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
71 }
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
72 #// Render the linked hidden field.
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
73 $Html .= "<input type=\"hidden\" id=\"$InstanceName\" name=\"$InstanceName\" value=\"$HtmlValue\" style=\"display:none\" />" ;
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
74
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
75 #// Render the configurations hidden field.
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
76 $cfgstr = &GetConfigFieldString();
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
77 $wk = $InstanceName."___Config";
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
78 $Html .= "<input type=\"hidden\" id=\"$wk\" value=\"$cfgstr\" style=\"display:none\" />" ;
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
79
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
80 #// Render the editor IFRAME.
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
81 $wk = $InstanceName."___Frame";
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
82 $Html .= "<iframe id=\"$wk\" src=\"$Link\" width=\"$Width\" height=\"$Height\" frameborder=\"0\" scrolling=\"no\"></iframe>";
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
83 } else {
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
84 if($Width =~ /\%/g){
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
85 $WidthCSS = $Width;
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
86 } else {
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
87 $WidthCSS = $Width . 'px';
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
88 }
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
89 if($Height =~ /\%/g){
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
90 $HeightCSS = $Height;
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
91 } else {
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
92 $HeightCSS = $Height . 'px';
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
93 }
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
94 $Html .= "<textarea name=\"$InstanceName\" rows=\"4\" cols=\"40\" style=\"width: $WidthCSS; height: $HeightCSS\">$HtmlValue</textarea>";
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
95 }
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
96 return($Html);
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
97 }
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
98
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
99 sub IsCompatible
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
100 {
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
101
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
102 $sAgent = $ENV{'HTTP_USER_AGENT'};
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
103 if(($sAgent =~ /MSIE/i) && !($sAgent =~ /mac/i) && !($sAgent =~ /Opera/i)) {
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
104 $iVersion = substr($sAgent,index($sAgent,'MSIE') + 5,3);
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
105 return($iVersion >= 5.5) ;
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
106 } elsif($sAgent =~ /Gecko\//i) {
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
107 $iVersion = substr($sAgent,index($sAgent,'Gecko/') + 6,8);
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
108 return($iVersion >= 20030210) ;
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
109 } elsif($sAgent =~ /Opera\//i) {
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
110 $iVersion = substr($sAgent,index($sAgent,'Opera/') + 6,4);
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
111 return($iVersion >= 9.5) ;
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
112 } elsif($sAgent =~ /AppleWebKit\/(\d+)/i) {
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
113 return($1 >= 522) ;
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
114 } else {
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
115 return(0); # 2.0 PR fix
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
116 }
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
117 }
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
118
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
119 sub GetConfigFieldString
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
120 {
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
121 $sParams = '';
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
122 $bFirst = 0;
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
123 foreach $sKey (keys %Config) {
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
124 $sValue = $Config{$sKey};
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
125 if($bFirst == 1) {
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
126 $sParams .= '&amp;';
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
127 } else {
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
128 $bFirst = 1;
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
129 }
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
130 $k = &specialchar_cnv($sKey);
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
131 $v = &specialchar_cnv($sValue);
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
132 if($sValue eq "true") {
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
133 $sParams .= "$k=true";
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
134 } elsif($sValue eq "false") {
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
135 $sParams .= "$k=false";
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
136 } else {
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
137 $sParams .= "$k=$v";
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
138 }
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
139 }
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
140 return($sParams);
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
141 }
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
142
287faf79876f upgrade FCKeditor from 2.6.4 to 2.6.4.1 (security update, see comments below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4545
diff changeset
143 1;