includes/render.php
changeset 1073 b19a9bcb6a45
parent 1066 bead71f28f63
child 1081 745200a9cc2a
equal deleted inserted replaced
1072:604213a07ce0 1073:b19a9bcb6a45
   310   /**
   310   /**
   311    * Restore stripped <nowiki> tags.
   311    * Restore stripped <nowiki> tags.
   312    * @access private
   312    * @access private
   313    */
   313    */
   314   
   314   
   315   public static function tag_unstrip($tag, &$text, &$stripdata)
   315   public static function tag_unstrip($tag, &$text, &$stripdata, $keep = false)
   316   {
   316   {
   317     $random_id = $stripdata['random_id'];
   317     $random_id = $stripdata['random_id'];
   318     
   318     
   319     foreach ( $stripdata['blocks'] as $i => $block )
   319     foreach ( $stripdata['blocks'] as $i => $block )
   320     {
   320     {
       
   321       $block = $keep ? "<$tag>$block</$tag>" : $block;
   321       $text = str_replace("{{$tag}:{$random_id}:{$i}}", $block, $text);
   322       $text = str_replace("{{$tag}:{$random_id}:{$i}}", $block, $text);
   322     }
   323     }
   323     
   324     
   324     $stripdata = array();
   325     $stripdata = array();
   325   }
   326   }