Permalink
Browse files

Applying fckeditor 2.6.11 fix see #7193

  • Loading branch information...
jmontoyaa committed Jun 17, 2014
1 parent 4a6d5e9 commit 2b6686e620407ab8d4ceb8951de4ce978917fc93
@@ -14,6 +14,9 @@
$spellercss = '../spellerStyle.css'; // by FredCK
$word_win_src = '../wordWindow.js'; // by FredCK
if (empty($_POST['textinputs']) || !is_array($_POST['textinputs'])) {
die();
}
$textinputs = $_POST['textinputs']; # array
$input_separator = "A";
@@ -22,9 +25,11 @@
# value of the text control submitted for spell-checking
function print_textinputs_var() {
global $textinputs;
foreach( $textinputs as $key=>$val ) {
for( $i = 0; $i < count( $textinputs ); $i++ ) {

This comment has been minimized.

@FraGoTe

FraGoTe Jun 17, 2014

Contributor

the correct way of using spaces in a for is

for ($i = 0; $i < 10; $i++) {

Source: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md#54-for

This comment has been minimized.

@jmontoyaa

jmontoyaa Jun 17, 2014

Member

This is a third party library. Not developed by us. We can't change all fckeditor to psr2.

This comment has been minimized.

@FraGoTe

FraGoTe Jun 17, 2014

Contributor

ohh, I see

if (!isset($textinputs[$i]))

This comment has been minimized.

@FraGoTe

FraGoTe Jun 17, 2014

Contributor

Missing braces

This comment has been minimized.

@jmontoyaa

jmontoyaa Jun 17, 2014

Member

Those are the changes made in fckeditor.

break;
# $val = str_replace( "'", "%27", $val );
echo "textinputs[$key] = decodeURIComponent(\"" . $val . "\");\n";
echo "textinputs[$i] = decodeURIComponent(\"" . htmlspecialchars($textinputs[$i], ENT_QUOTES) . "\");\n";
}
}
@@ -81,6 +86,8 @@ function print_checker_results() {
# open temp file, add the submitted text.
if( $fh = fopen( $tempfile, 'w' )) {
for( $i = 0; $i < count( $textinputs ); $i++ ) {
if (!isset($textinputs[$i]))

This comment has been minimized.

@FraGoTe

FraGoTe Jun 17, 2014

Contributor

I think that you forgot to use braces

This comment has been minimized.

@jmontoyaa

jmontoyaa Jun 17, 2014

Member

Those are the changes made in fckeditor.

break;
$text = urldecode( $textinputs[$i] );
// Strip all tags for the text. (by FredCK - #339 / #681)

0 comments on commit 2b6686e

Please sign in to comment.