mirror of
https://github.com/friendica/friendica
synced 2025-04-19 06:30:10 +00:00
bbcode: Function for cleaning CSS commands (not yet in function)
items.php: The detection if a rss/atom-title is identically to the body is improved.
This commit is contained in:
parent
b904a21134
commit
d40f25ae08
2 changed files with 19 additions and 0 deletions
|
@ -3,7 +3,24 @@
|
|||
require_once("include/oembed.php");
|
||||
require_once('include/event.php');
|
||||
|
||||
function cleancss($input) {
|
||||
|
||||
$cleaned = "";
|
||||
|
||||
$input = strtolower($input);
|
||||
|
||||
for ($i = 0; $i < strlen($input); $i++) {
|
||||
$char = substr($input, $i, 1);
|
||||
|
||||
if (($char >= "a") and ($char <= "z"))
|
||||
$cleaned .= $char;
|
||||
|
||||
if (!(strpos(" #;:0123456789", $char) === false))
|
||||
$cleaned .= $char;
|
||||
}
|
||||
|
||||
return($cleaned);
|
||||
}
|
||||
|
||||
function stripcode_br_cb($s) {
|
||||
return '[code]' . str_replace('<br />', '', $s[1]) . '[/code]';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue