コード例 #1
0
ファイル: PHPWS_Text.php プロジェクト: HaldunA/phpwebsite
 /**
  * Prepares text for display
  *
  * Should be used after retrieving data from the database
  *
  * @author                       Matthew McNaney <mcnaney at gmail dot com>
  * @param   string  text         Text to parse
  * @param   boolean decode       Whether entity_decoding should take place.
  * @param   boolean use_filters  If true, any filters requested in the text_settings file will be
  *                               run against the output text. (deprecated)
  * @return  string  text         Stripped text
  */
 public static function parseOutput($text, $decode = ENCODE_PARSED_TEXT, $use_filters = false, $use_breaker = USE_BREAKER, $fix_anchors = FIX_ANCHORS)
 {
     $t = new PHPWS_Text();
     $t->setText($text, $decode);
     $t->useBreaker($use_breaker);
     $t->useAnchor($fix_anchors);
     $text = $t->getPrint();
     $text = filter_var($text, FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH);
     return $text;
 }