コード例 #1
0
ファイル: inputfilter.php プロジェクト: habari/system
 /**
  * Perform all filtering, return new string.
  * @param string $str Input string.
  * @return string Filtered output string.
  */
 public static function filter($str)
 {
     if (!MultiByte::valid_data($str)) {
         return '';
     } else {
         do {
             $_str = $str;
             $str = self::strip_nulls($str);
             $str = self::strip_illegal_entities($str);
             $str = self::filter_html_elements($str);
         } while ($str != $_str);
         return $str;
     }
 }
コード例 #2
0
ファイル: comments_items.php プロジェクト: wwxgitcat/habari
</p>
			<?php 
        }
        ?>

			<?php 
        Plugins::act('comment_info', $comment);
        ?>

			<p class="comment-type"><?php 
        echo Plugins::filter('comment_type_display', $comment->typename, 'singular');
        ?>
</p>
		</div>
		<span class="content pct75"><?php 
        if (MultiByte::valid_data($comment->content)) {
            echo nl2br(Utils::htmlspecialchars($comment->content));
        } else {
            _e('this post contains text in an invalid encoding');
        }
        ?>
</span>
	</div>
</div>

<?php 
    }
} else {
    ?>
<div class="message none">
	<p><?php