includes/render.php
changeset 24 9ecc94c4c7f5
parent 21 663fcf528726
child 35 efae425e9b98
equal deleted inserted replaced
23:320acf077276 24:9ecc94c4c7f5
   595     global $db, $session, $paths, $template, $plugins; // Common objects
   595     global $db, $session, $paths, $template, $plugins; // Common objects
   596     $random_id = md5( time() . mt_rand() );
   596     $random_id = md5( time() . mt_rand() );
   597     
   597     
   598     $can_do_php = ( $session->get_permissions('php_in_pages') && !$strip_all_php );
   598     $can_do_php = ( $session->get_permissions('php_in_pages') && !$strip_all_php );
   599     
   599     
   600     $text = sanitize_html($text, ( !$can_do_php ));
       
   601     
       
   602     if ( !$can_do_php )
   600     if ( !$can_do_php )
   603     {
   601     {
       
   602       $text = sanitize_html($text, true);
   604       // If we can't do PHP, we can't do Javascript either.
   603       // If we can't do PHP, we can't do Javascript either.
   605       $text = RenderMan::destroy_javascript($text);
   604       $text = RenderMan::destroy_javascript($text);
   606     }
   605     }
   607     
   606     
   608     // Strip out <nowiki> sections and PHP code
   607     // Strip out <nowiki> sections and PHP code