import v1.1.0_beta1 | 2009-08-21

This commit is contained in:
2019-07-17 22:16:19 +02:00
parent 2c1152f0d3
commit 8dee6b1a10
2306 changed files with 251360 additions and 23428 deletions

21
libs/Monkeys/Lib.php Normal file
View File

@ -0,0 +1,21 @@
<?php
class Monkeys_Lib
{
/**
* Converts the HTML BR tag into plain-text linebreaks
*
* Taken from comments on the nl2br function PHP's online manual.
* "Since nl2br doesn't remove the line breaks when adding in the <br /> tags, it is necessary to strip those off before you convert all of the tags, otherwise you will get double spacing"
*
* @access public
* @static
* @param string $str
* @return string
*/
static function br2nl($str)
{
$str = preg_replace("/(\r\n|\n|\r)/", "", $str);
return preg_replace('=<br */?>=i', "\n", $str);
}
}