|
@@ -395,8 +395,12 @@ if(!defined('entry') || !entry) die('Not a valid page');
|
395
|
395
|
return $dirs;
|
396
|
396
|
}
|
397
|
397
|
|
398
|
|
- function removeBadTags($source) {
|
399
|
|
- $validTags ='<p><ol><ul><li><a><abbr><acronym><blockquote><code><pre><em><i><strike><s><strong><b><br><span><div><img>';
|
|
398
|
+ function removeBadTags($source,$secure=false) {
|
|
399
|
+ if($secure){
|
|
400
|
+ $validTags ='<abbr><acronym><em><i><strong><b><span>';
|
|
401
|
+ } else {
|
|
402
|
+ $validTags ='<p><ol><ul><li><a><abbr><acronym><blockquote><code><pre><em><i><strong><b><br><span><div><img>';
|
|
403
|
+ }
|
400
|
404
|
$source = strip_tags($source, $validTags);
|
401
|
405
|
return preg_replace('/<(.*?)>/ie', "'<'.removeBadAtributes('\\1').'>'", $source);
|
402
|
406
|
}
|