Commit 0f419d80 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

update FCKeditor to 2.6.8.

parent 017b773d
......@@ -12,7 +12,7 @@
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts83858910.0</string> </value>
<value> <string>ts44338434.35</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
......@@ -106,7 +106,7 @@ window.onload = function()\r\n
\t\t\t\t\t\t\t\tborder-left: #000000 1px solid; border-bottom: #000000 1px solid">\r\n
\t\t\t\t\t\t\t\t<span fcklang="DlgAboutVersion">version</span>\r\n
\t\t\t\t\t\t\t\t<br />\r\n
\t\t\t\t\t\t\t\t<b>2.6.6</b><br />\r\n
\t\t\t\t\t\t\t\t<b>2.6.8</b><br />\r\n
\t\t\t\t\t\t\t\tBuild 25427</td>\r\n
\t\t\t\t\t\t</tr>\r\n
\t\t\t\t\t</table>\r\n
......
......@@ -12,7 +12,7 @@
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts83858910.02</string> </value>
<value> <string>ts44338467.6</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
......@@ -20,7 +20,7 @@
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/x-unknown-content-type</string> </value>
<value> <string>application/octet-stream</string> </value>
</item>
<item>
<key> <string>data</string> </key>
......@@ -93,7 +93,7 @@ others files in certain cases.\r\n
<!--- Generate Text Inputs --->\r\n
<cfset i = 0>\r\n
<cfloop list="#submitted_text#" index="textinput">\r\n
<cfset texts.textinputs = ListAppend(texts.textinputs, \'textinputs[#i#] = decodeURIComponent("#textinput#");\', CRLF)>\r\n
<cfset texts.textinputs = ListAppend(texts.textinputs, \'textinputs[#i#] = decodeURIComponent("\' & htmleditformat( textinput ) & \'");\', CRLF)>\r\n
<cfset i = i + 1>\r\n
</cfloop>\r\n
\r\n
......@@ -184,7 +184,7 @@ wordWindowObj.writeBody();\r\n
</item>
<item>
<key> <string>size</string> </key>
<value> <int>5538</int> </value>
<value> <int>5562</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -12,7 +12,7 @@
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts83858910.02</string> </value>
<value> <string>ts44338476.75</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
......@@ -20,7 +20,7 @@
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/x-unknown-content-type</string> </value>
<value> <string>application/x-php</string> </value>
</item>
<item>
<key> <string>data</string> </key>
......@@ -52,7 +52,7 @@ function print_textinputs_var() {\r\n
\tglobal $textinputs;\r\n
\tforeach( $textinputs as $key=>$val ) {\r\n
\t\t# $val = str_replace( "\'", "%27", $val );\r\n
\t\techo "textinputs[$key] = decodeURIComponent(\\"" . $val . "\\");\\n";\r\n
\t\techo "textinputs[$key] = decodeURIComponent(\\"" . htmlspecialchars($val, ENT_QUOTES) . "\\");\\n";\r\n
\t}\r\n
}\r\n
\r\n
......@@ -235,7 +235,7 @@ wordWindowObj.writeBody();\r\n
</item>
<item>
<key> <string>size</string> </key>
<value> <int>5854</int> </value>
<value> <int>5884</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -12,7 +12,7 @@
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts83858910.02</string> </value>
<value> <string>ts44338484.34</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
......@@ -20,193 +20,205 @@
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/plain</string> </value>
<value> <string>application/octet-stream</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
#!/usr/bin/perl\r\n
\r\n
use CGI qw/ :standard /;\r\n
use File::Temp qw/ tempfile tempdir /;\r\n
\r\n
# my $spellercss = \'/speller/spellerStyle.css\';\t\t\t\t\t# by FredCK\r\n
my $spellercss = \'../spellerStyle.css\';\t\t\t\t\t\t\t# by FredCK\r\n
# my $wordWindowSrc = \'/speller/wordWindow.js\';\t\t\t\t\t# by FredCK\r\n
my $wordWindowSrc = \'../wordWindow.js\';\t\t\t\t\t\t\t# by FredCK\r\n
my @textinputs = param( \'textinputs[]\' ); # array\r\n
# my $aspell_cmd = \'aspell\';\t\t\t\t\t\t\t\t\t# by FredCK (for Linux)\r\n
my $aspell_cmd = \'"C:\\Program Files\\Aspell\\bin\\aspell.exe"\';\t# by FredCK (for Windows)\r\n
my $lang = \'en_US\';\r\n
# my $aspell_opts = "-a --lang=$lang --encoding=utf-8";\t\t\t# by FredCK\r\n
my $aspell_opts = "-a --lang=$lang --encoding=utf-8 -H --rem-sgml-check=alt";\t\t# by FredCK\r\n
my $input_separator = "A";\r\n
\r\n
# set the \'wordtext\' JavaScript variable to the submitted text.\r\n
sub printTextVar {\r\n
\tfor( my $i = 0; $i <= $#textinputs; $i++ ) {\r\n
\t print "textinputs[$i] = decodeURIComponent(\'" . escapeQuote( $textinputs[$i] ) . "\')\\n";\r\n
\t}\r\n
}\r\n
\r\n
sub printTextIdxDecl {\r\n
\tmy $idx = shift;\r\n
\tprint "words[$idx] = [];\\n";\r\n
\tprint "suggs[$idx] = [];\\n";\r\n
}\r\n
\r\n
sub printWordsElem {\r\n
\tmy( $textIdx, $wordIdx, $word ) = @_;\r\n
\tprint "words[$textIdx][$wordIdx] = \'" . escapeQuote( $word ) . "\';\\n";\r\n
}\r\n
\r\n
sub printSuggsElem {\r\n
\tmy( $textIdx, $wordIdx, @suggs ) = @_;\r\n
\tprint "suggs[$textIdx][$wordIdx] = [";\r\n
\tfor my $i ( 0..$#suggs ) {\r\n
\t\tprint "\'" . escapeQuote( $suggs[$i] ) . "\'";\r\n
\t\tif( $i < $#suggs ) {\r\n
\t\t\tprint ", ";\r\n
\t\t}\r\n
\t}\r\n
\tprint "];\\n";\r\n
}\r\n
\r\n
sub printCheckerResults {\r\n
\tmy $textInputIdx = -1;\r\n
\tmy $wordIdx = 0;\r\n
\tmy $unhandledText;\r\n
\t# create temp file\r\n
\tmy $dir = tempdir( CLEANUP => 1 );\r\n
\tmy( $fh, $tmpfilename ) = tempfile( DIR => $dir );\r\n
\r\n
\t# temp file was created properly?\r\n
\r\n
\t# open temp file, add the submitted text.\r\n
\tfor( my $i = 0; $i <= $#textinputs; $i++ ) {\r\n
\t\t$text = url_decode( $textinputs[$i] );\r\n
\t\t# Strip all tags for the text. (by FredCK - #339 / #681)\r\n
\t\t$text =~ s/<[^>]+>/ /g;\r\n
\t\t@lines = split( /\\n/, $text );\r\n
\t\tprint $fh "\\%\\n"; # exit terse mode\r\n
\t\tprint $fh "^$input_separator\\n";\r\n
\t\tprint $fh "!\\n"; # enter terse mode\r\n
\t\tfor my $line ( @lines ) {\r\n
\t\t\t# use carat on each line to escape possible aspell commands\r\n
\t\t\tprint $fh "^$line\\n";\r\n
\t\t}\r\n
\r\n
\t}\r\n
\t# exec aspell command\r\n
\tmy $cmd = "$aspell_cmd $aspell_opts < $tmpfilename 2>&1";\r\n
\topen ASPELL, "$cmd |" or handleError( "Could not execute `$cmd`\\\\n$!" ) and return;\r\n
\t# parse each line of aspell return\r\n
\tfor my $ret ( <ASPELL> ) {\r\n
\t\tchomp( $ret );\r\n
\t\t# if \'&\', then not in dictionary but has suggestions\r\n
\t\t# if \'#\', then not in dictionary and no suggestions\r\n
\t\t# if \'*\', then it is a delimiter between text inputs\r\n
\t\tif( $ret =~ /^\\*/ ) {\r\n
\t\t\t$textInputIdx++;\r\n
\t\t\tprintTextIdxDecl( $textInputIdx );\r\n
\t\t\t$wordIdx = 0;\r\n
\r\n
\t\t} elsif( $ret =~ /^(&|#)/ ) {\r\n
\t\t\tmy @tokens = split( " ", $ret, 5 );\r\n
\t\t\tprintWordsElem( $textInputIdx, $wordIdx, $tokens[1] );\r\n
\t\t\tmy @suggs = ();\r\n
\t\t\tif( $tokens[4] ) {\r\n
\t\t\t\t@suggs = split( ", ", $tokens[4] );\r\n
\t\t\t}\r\n
\t\t\tprintSuggsElem( $textInputIdx, $wordIdx, @suggs );\r\n
\t\t\t$wordIdx++;\r\n
\t\t} else {\r\n
\t\t\t$unhandledText .= $ret;\r\n
\t\t}\r\n
\t}\r\n
\tclose ASPELL or handleError( "Error executing `$cmd`\\\\n$unhandledText" ) and return;\r\n
}\r\n
\r\n
sub escapeQuote {\r\n
\tmy $str = shift;\r\n
\t$str =~ s/\'/\\\\\'/g;\r\n
\treturn $str;\r\n
}\r\n
\r\n
sub handleError {\r\n
\tmy $err = shift;\r\n
\tprint "error = \'" . escapeQuote( $err ) . "\';\\n";\r\n
}\r\n
\r\n
sub url_decode {\r\n
\tlocal $_ = @_ ? shift : $_;\r\n
\tdefined or return;\r\n
\t# change + signs to spaces\r\n
\ttr/+/ /;\r\n
\t# change hex escapes to the proper characters\r\n
\ts/%([a-fA-F0-9]{2})/pack "H2", $1/eg;\r\n
\treturn $_;\r\n
}\r\n
\r\n
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #\r\n
# Display HTML\r\n
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #\r\n
\r\n
print <<EOF;\r\n
Content-type: text/html; charset=utf-8\r\n
\r\n
<html>\r\n
<head>\r\n
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">\r\n
<link rel="stylesheet" type="text/css" href="$spellercss"/>\r\n
<script src="$wordWindowSrc"></script>\r\n
<script type="text/javascript">\r\n
var suggs = new Array();\r\n
var words = new Array();\r\n
var textinputs = new Array();\r\n
var error;\r\n
EOF\r\n
\r\n
printTextVar();\r\n
\r\n
printCheckerResults();\r\n
\r\n
print <<EOF;\r\n
var wordWindowObj = new wordWindow();\r\n
wordWindowObj.originalSpellings = words;\r\n
wordWindowObj.suggestions = suggs;\r\n
wordWindowObj.textInputs = textinputs;\r\n
\r\n
\r\n
function init_spell() {\r\n
\t// check if any error occured during server-side processing\r\n
\tif( error ) {\r\n
\t\talert( error );\r\n
\t} else {\r\n
\t\t// call the init_spell() function in the parent frameset\r\n
\t\tif (parent.frames.length) {\r\n
\t\t\tparent.init_spell( wordWindowObj );\r\n
\t\t} else {\r\n
\t\t\terror = "This page was loaded outside of a frameset. ";\r\n
\t\t\terror += "It might not display properly";\r\n
\t\t\talert( error );\r\n
\t\t}\r\n
\t}\r\n
}\r\n
\r\n
</script>\r\n
\r\n
</head>\r\n
<body onLoad="init_spell();">\r\n
\r\n
<script type="text/javascript">\r\n
wordWindowObj.writeBody();\r\n
</script>\r\n
\r\n
</body>\r\n
</html>\r\n
EOF\r\n
#!/usr/bin/perl\n
\n
use CGI qw/ :standard /;\n
use File::Temp qw/ tempfile tempdir /;\n
\n
# my $spellercss = \'/speller/spellerStyle.css\';\t\t\t\t\t# by FredCK\n
my $spellercss = \'../spellerStyle.css\';\t\t\t\t\t\t\t# by FredCK\n
# my $wordWindowSrc = \'/speller/wordWindow.js\';\t\t\t\t\t# by FredCK\n
my $wordWindowSrc = \'../wordWindow.js\';\t\t\t\t\t\t\t# by FredCK\n
my @textinputs = param( \'textinputs[]\' ); # array\n
# my $aspell_cmd = \'aspell\';\t\t\t\t\t\t\t\t\t# by FredCK (for Linux)\n
my $aspell_cmd = \'"C:\\Program Files\\Aspell\\bin\\aspell.exe"\';\t# by FredCK (for Windows)\n
my $lang = \'en_US\';\n
# my $aspell_opts = "-a --lang=$lang --encoding=utf-8";\t\t\t# by FredCK\n
my $aspell_opts = "-a --lang=$lang --encoding=utf-8 -H --rem-sgml-check=alt";\t\t# by FredCK\n
my $input_separator = "A";\n
\n
# set the \'wordtext\' JavaScript variable to the submitted text.\n
sub printTextVar {\n
\tfor( my $i = 0; $i <= $#textinputs; $i++ ) {\n
\t print "textinputs[$i] = decodeURIComponent(\\"" . specialchar_cnv( $textinputs[$i] ) . "\\");\\n";\n
\t}\n
}\n
\n
sub printTextIdxDecl {\n
\tmy $idx = shift;\n
\tprint "words[$idx] = [];\\n";\n
\tprint "suggs[$idx] = [];\\n";\n
}\n
\n
sub printWordsElem {\n
\tmy( $textIdx, $wordIdx, $word ) = @_;\n
\tprint "words[$textIdx][$wordIdx] = \'" . escapeQuote( $word ) . "\';\\n";\n
}\n
\n
sub printSuggsElem {\n
\tmy( $textIdx, $wordIdx, @suggs ) = @_;\n
\tprint "suggs[$textIdx][$wordIdx] = [";\n
\tfor my $i ( 0..$#suggs ) {\n
\t\tprint "\'" . escapeQuote( $suggs[$i] ) . "\'";\n
\t\tif( $i < $#suggs ) {\n
\t\t\tprint ", ";\n
\t\t}\n
\t}\n
\tprint "];\\n";\n
}\n
\n
sub printCheckerResults {\n
\tmy $textInputIdx = -1;\n
\tmy $wordIdx = 0;\n
\tmy $unhandledText;\n
\t# create temp file\n
\tmy $dir = tempdir( CLEANUP => 1 );\n
\tmy( $fh, $tmpfilename ) = tempfile( DIR => $dir );\n
\n
\t# temp file was created properly?\n
\n
\t# open temp file, add the submitted text.\n
\tfor( my $i = 0; $i <= $#textinputs; $i++ ) {\n
\t\t$text = url_decode( $textinputs[$i] );\n
\t\t# Strip all tags for the text. (by FredCK - #339 / #681)\n
\t\t$text =~ s/<[^>]+>/ /g;\n
\t\t@lines = split( /\\n/, $text );\n
\t\tprint $fh "\\%\\n"; # exit terse mode\n
\t\tprint $fh "^$input_separator\\n";\n
\t\tprint $fh "!\\n"; # enter terse mode\n
\t\tfor my $line ( @lines ) {\n
\t\t\t# use carat on each line to escape possible aspell commands\n
\t\t\tprint $fh "^$line\\n";\n
\t\t}\n
\n
\t}\n
\t# exec aspell command\n
\tmy $cmd = "$aspell_cmd $aspell_opts < $tmpfilename 2>&1";\n
\topen ASPELL, "$cmd |" or handleError( "Could not execute `$cmd`\\\\n$!" ) and return;\n
\t# parse each line of aspell return\n
\tfor my $ret ( <ASPELL> ) {\n
\t\tchomp( $ret );\n
\t\t# if \'&\', then not in dictionary but has suggestions\n
\t\t# if \'#\', then not in dictionary and no suggestions\n
\t\t# if \'*\', then it is a delimiter between text inputs\n
\t\tif( $ret =~ /^\\*/ ) {\n
\t\t\t$textInputIdx++;\n
\t\t\tprintTextIdxDecl( $textInputIdx );\n
\t\t\t$wordIdx = 0;\n
\n
\t\t} elsif( $ret =~ /^(&|#)/ ) {\n
\t\t\tmy @tokens = split( " ", $ret, 5 );\n
\t\t\tprintWordsElem( $textInputIdx, $wordIdx, $tokens[1] );\n
\t\t\tmy @suggs = ();\n
\t\t\tif( $tokens[4] ) {\n
\t\t\t\t@suggs = split( ", ", $tokens[4] );\n
\t\t\t}\n
\t\t\tprintSuggsElem( $textInputIdx, $wordIdx, @suggs );\n
\t\t\t$wordIdx++;\n
\t\t} else {\n
\t\t\t$unhandledText .= $ret;\n
\t\t}\n
\t}\n
\tclose ASPELL or handleError( "Error executing `$cmd`\\\\n$unhandledText" ) and return;\n
}\n
\n
sub escapeQuote {\n
\tmy $str = shift;\n
\t$str =~ s/\'/\\\\\'/g;\n
\treturn $str;\n
}\n
\n
sub specialchar_cnv\n
{\n
\tlocal($ch) = @_;\n
\n
\t$ch =~ s/&/&amp;/g;\t\t# &\n
\t$ch =~ s/\\"/&quot;/g;\t#"\n
\t$ch =~ s/\\\'/&#39;/g;\t# \'\n
\t$ch =~ s/</&lt;/g;\t\t# <\n
\t$ch =~ s/>/&gt;/g;\t\t# >\n
\treturn($ch);\n
}\n
\n
sub handleError {\n
\tmy $err = shift;\n
\tprint "error = \'" . escapeQuote( $err ) . "\';\\n";\n
}\n
\n
sub url_decode {\n
\tlocal $_ = @_ ? shift : $_;\n
\tdefined or return;\n
\t# change + signs to spaces\n
\ttr/+/ /;\n
\t# change hex escapes to the proper characters\n
\ts/%([a-fA-F0-9]{2})/pack "H2", $1/eg;\n
\treturn $_;\n
}\n
\n
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #\n
# Display HTML\n
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #\n
\n
print <<EOF;\n
Content-type: text/html; charset=utf-8\n
\n
<html>\n
<head>\n
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">\n
<link rel="stylesheet" type="text/css" href="$spellercss"/>\n
<script src="$wordWindowSrc"></script>\n
<script type="text/javascript">\n
var suggs = new Array();\n
var words = new Array();\n
var textinputs = new Array();\n
var error;\n
EOF\n
\n
printTextVar();\n
\n
printCheckerResults();\n
\n
print <<EOF;\n
var wordWindowObj = new wordWindow();\n
wordWindowObj.originalSpellings = words;\n
wordWindowObj.suggestions = suggs;\n
wordWindowObj.textInputs = textinputs;\n
\n
\n
function init_spell() {\n
\t// check if any error occured during server-side processing\n
\tif( error ) {\n
\t\talert( error );\n
\t} else {\n
\t\t// call the init_spell() function in the parent frameset\n
\t\tif (parent.frames.length) {\n
\t\t\tparent.init_spell( wordWindowObj );\n
\t\t} else {\n
\t\t\terror = "This page was loaded outside of a frameset. ";\n
\t\t\terror += "It might not display properly";\n
\t\t\talert( error );\n
\t\t}\n
\t}\n
}\n
\n
</script>\n
\n
</head>\n
<body onLoad="init_spell();">\n
\n
<script type="text/javascript">\n
wordWindowObj.writeBody();\n
</script>\n
\n
</body>\n
</html>\n
EOF\n
]]></string> </value>
......@@ -217,7 +229,7 @@ EOF\r\n
</item>
<item>
<key> <string>size</string> </key>
<value> <int>4927</int> </value>
<value> <int>4939</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -12,7 +12,7 @@
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts83858910.28</string> </value>
<value> <string>ts44338348.56</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
......@@ -87,7 +87,7 @@ FCKeditor.MinHeight = 200 ;\r\n
*/\r\n
FCKeditor.MinWidth = 750 ;\r\n
\r\n
FCKeditor.prototype.Version\t\t\t= \'2.6.6\' ;\r\n
FCKeditor.prototype.Version\t\t\t= \'2.6.8\' ;\r\n
FCKeditor.prototype.VersionBuild\t= \'25427\' ;\r\n
\r\n
FCKeditor.prototype.Create = function()\r\n
......
2012-08-07 Kazuhiko
* update FCKeditor to 2.6.8.
2011-01-20 Ivan
* Remove contained MochiKit Javascript library
......
Copyright (c) 2006-2007 Nexedi SA
\ No newline at end of file
Copyright (c) 2006-2012 Nexedi SA
\ No newline at end of file
1084
\ No newline at end of file
1085
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment