stripTags() public static method

将带有html标签的富文本内容,去掉标签,去掉空格
public static stripTags ( string $str ) : string
$str string
return string
Exemplo n.º 1
0
 /**
  * Will sanitize given paths, so that we are as compatibles as we possibly can with every other Web technology out there;
  *
  * This method, sanitizePATH, will catch the path string and change it so that it will rename it to something with just
  * [a-zA-Z0-9 and a few other allowed chars]. We do this because it was proven that some Web technologies are sensitive to
  * for example commas, like Javascript, like Flash and some other web techs;
  *
  * @param S $objStringToCLEAN The path to sanitize ...
  * @return string Will return the same string, only cleaned ...
  */
 public static function sanitizePATH(S $objStringToCLEAN)
 {
     return $objStringToCLEAN->stripTags()->eregReplace('[^a-zA-Z0-9_.-]', _SP)->trimLeft()->trimRight()->eregReplace(_SP, _U)->toLower();
 }