Ticket #681: 681_php.patch

File 681_php.patch, 0.7 KB (added by fredck, 2 years ago)

Proposal fix for the PHP implementation

  • editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.php

     
    8282        if( $fh = fopen( $tempfile, 'w' )) { 
    8383                for( $i = 0; $i < count( $textinputs ); $i++ ) { 
    8484                        $text = urldecode( $textinputs[$i] ); 
     85 
     86                        // Strip all tags for the text. (by FredCK - #339 / #681) 
     87                        $text = preg_replace( "/<[^>]+>/", " ", $text ) ; 
     88 
    8589                        $lines = explode( "\n", $text ); 
    8690                        fwrite ( $fh, "%\n" ); # exit terse mode 
    8791                        fwrite ( $fh, "^$input_separator\n" );