Changeset 1584

Show
Ignore:
Timestamp:
04/22/08 08:12:39 (3 months ago)
Author:
misja
Message:

Misja Hoebe <misja@curverider.co.uk> Applies attachment:ticket:214:01212_weblog_comments_noname.diff This patch was waiting to get committed for some time, see #214

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • devel/mod/blog/lib/weblogs_comments_add.php

    r1540 r1584  
    3838                             
    3939        if (logged_on) { 
    40             $comment_name = $_SESSION['name']; 
     40            $comment_name = htmlspecialchars($_SESSION['name'], ENT_COMPAT, 'utf-8'); 
     41            $run_result .= '<input type="hidden" name="postedname" value="'.$comment_name.'" />'; 
    4142        } else { 
    4243            $comment_name = __gettext("Guest"); 
     44 
     45            $run_result .= templates_draw(array( 
     46             
     47                                    'context' => 'databox1', 
     48                                    'name' => __gettext("Your name"), 
     49                                    'column1' => "<input type=\"text\" name=\"postedname\" value=\"".htmlspecialchars($comment_name, ENT_COMPAT, 'utf-8')."\" />" 
     50             
     51                                ) 
     52                                ); 
     53 
    4354        } 
    4455 
    45         $run_result .= templates_draw(array( 
    46          
    47                                 'context' => 'databox1', 
    48                                 'name' => __gettext("Your name"), 
    49                                 'column1' => "<input type=\"text\" name=\"postedname\" value=\"".htmlspecialchars($comment_name, ENT_COMPAT, 'utf-8')."\" />" 
    50          
    51                             ) 
    52                             ); 
    5356         
    5457        $run_result .= templates_draw(array(