Skip to content

Commit

Permalink
isHtml func
Browse files Browse the repository at this point in the history
  • Loading branch information
ronanguilloux committed Nov 22, 2011
1 parent 10671c6 commit d11c430
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions lib/class.strings.php
Expand Up @@ -217,4 +217,18 @@ function remove_linebreaks ($string) {
return (string) str_replace(array("\r", "\r\n", "\n"), '', $string);
}

/**
* is_html : Tests a string & check if it's html
*
* @param mixed $string
* @return string
*/
function isHtml($string) {
if(strlen($string) == strlen(strip_tags($string))){
return false
}

return true;
}

}

0 comments on commit d11c430

Please sign in to comment.