File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
main/inc/lib/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 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
2225# value of the text control submitted for spell-checking
2326function 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)
You can’t perform that action at this time.
0 commit comments