Skip to content

Commit 2b6686e

Browse files
committed
Applying fckeditor 2.6.11 fix see #7193
1 parent 4a6d5e9 commit 2b6686e

File tree

1 file changed

+9
-2
lines changed
  • main/inc/lib/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts

1 file changed

+9
-2
lines changed

main/inc/lib/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
$spellercss = '../spellerStyle.css'; // by FredCK
1515
$word_win_src = '../wordWindow.js'; // by FredCK
1616

17+
if (empty($_POST['textinputs']) || !is_array($_POST['textinputs'])) {
18+
die();
19+
}
1720
$textinputs = $_POST['textinputs']; # array
1821
$input_separator = "A";
1922

@@ -22,9 +25,11 @@
2225
# value of the text control submitted for spell-checking
2326
function print_textinputs_var() {
2427
global $textinputs;
25-
foreach( $textinputs as $key=>$val ) {
28+
for( $i = 0; $i < count( $textinputs ); $i++ ) {
29+
if (!isset($textinputs[$i]))
30+
break;
2631
# $val = str_replace( "'", "%27", $val );
27-
echo "textinputs[$key] = decodeURIComponent(\"" . $val . "\");\n";
32+
echo "textinputs[$i] = decodeURIComponent(\"" . htmlspecialchars($textinputs[$i], ENT_QUOTES) . "\");\n";
2833
}
2934
}
3035

@@ -81,6 +86,8 @@ function print_checker_results() {
8186
# open temp file, add the submitted text.
8287
if( $fh = fopen( $tempfile, 'w' )) {
8388
for( $i = 0; $i < count( $textinputs ); $i++ ) {
89+
if (!isset($textinputs[$i]))
90+
break;
8491
$text = urldecode( $textinputs[$i] );
8592

8693
// Strip all tags for the text. (by FredCK - #339 / #681)

0 commit comments

Comments
 (0)