Dotclear

Changeset 893


Ignore:
Timestamp:
03/16/09 14:03:46 (14 years ago)
Author:
Moe
Message:

Contribute 1.0-alpha9 :

  • added HTML filter to excerpt and content (thanks to Thomas Bouron and Vincent Garnier)
  • escaped host display in admin
Location:
plugins/contribute
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • plugins/contribute/_admin.php

    r848 r893  
    143143                    if (!empty($host)) 
    144144                    { 
    145                          $link = '<br />'. 
    146                               '<a href="'.html::escapeHTML($site).'">'.$host.'</a>'; 
     145                         $link = '<br />'.'<a href="'.html::escapeHTML($site).'">'. 
     146                              html::escapeHTML($host).'</a>'; 
    147147                    } 
    148148               } 
  • plugins/contribute/_define.php

    r872 r893  
    2828     /* Description*/                "Allow visitors to contribute to your blog", 
    2929     /* Author */                    "Moe (http://gniark.net/)", 
    30      /* Version */                   '1.0-alpha8', 
     30     /* Version */                   '1.0-alpha9', 
    3131     /* Permissions */               'admin' 
    3232); 
  • plugins/contribute/_public.php

    r848 r893  
    200200                              { 
    201201                                   $post->post_format = $_POST['post_format']; 
    202                                    // fixme : security :limit to wiki without XHTML ? 
    203                                    // $core->wiki2xhtml->setOpt('parse_pre',0); 
    204202                              } 
    205203                         } 
     
    236234                    } 
    237235                     
     236                    # HTML filter 
     237                    $filter = new htmlFilter; 
    238238                    # excerpt 
    239                     if (($core->blog->settings->contribute_allow_category === true) 
     239                    if (($core->blog->settings->contribute_allow_excerpt === true) 
    240240                         && (isset($_POST['post_excerpt']))) 
    241241                    { 
    242                          $post->post_excerpt = $_POST['post_excerpt']; 
     242                         $post->post_excerpt = trim($filter->apply($_POST['post_excerpt'])); 
    243243                    } 
    244244                    # content 
    245245                    if (isset($_POST['post_content'])) 
    246246                    { 
    247                          $post->post_content = $_POST['post_content']; 
    248                     } 
     247                         $post->post_content = trim($filter->apply($_POST['post_content'])); 
     248                    } 
     249                    unset($filter); 
    249250                     
    250251                    # avoid Notice: Indirect modification of overloaded property 
Note: See TracChangeset for help on using the changeset viewer.

Sites map