Changeset 738
- Timestamp:
- 03/30/11 12:17:19 (14 months ago)
- Location:
- trunk
- Files:
-
- 5 edited
-
components/clubs/frontend.php (modified) (1 diff)
-
components/content/frontend.php (modified) (1 diff)
-
components/forum/frontend.php (modified) (1 diff)
-
core/cms.php (modified) (1 diff)
-
includes/bbcode/bbcode.lib.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/components/clubs/frontend.php
r705 r738 273 273 //save to database 274 274 $description = $inCore->request('description', 'html', ''); 275 $description = $inCore->badTagClear($description);275 $description = $inCore->badTagClear($description); 276 276 $description = $inDB->escape_string($description); 277 277 $admin_id = $club['admin_id']; -
trunk/components/content/frontend.php
r594 r738 410 410 411 411 $article['published'] = $is_auto_add ? 1 : 0; 412 if ($do=='editarticle'){413 $article['published'] = ($mod['published'] == 0) ? $mod['published'] : $article['published'];414 }412 if ($do=='editarticle'){ 413 $article['published'] = ($mod['published'] == 0) ? $mod['published'] : $article['published']; 414 } 415 415 $article['pubdate'] = $mod['pubdate'] ? $mod['pubdate'] : date('Y-m-d H:i'); 416 416 $article['enddate'] = $article['pubdate']; -
trunk/components/forum/frontend.php
r732 r738 784 784 } else { 785 785 $message_post = $inCore->request('message', 'html'); 786 $message = $inDB->escape_string($message_post);787 786 $message = $inCore->badTagClear($message); 787 $message = $inDB->escape_string($message_post); 788 788 if (!$message) { echo '<p>'.$_LANG['NEED_TEXT_POST'].'</p>'; return; } 789 789 -
trunk/core/cms.php
r709 r738 3232 3232 */ 3233 3233 public static function badTagClear($string){ 3234 $bad_teg = array ("'<script[^>]*?>.*?</script>'si", 3235 "'<iframe[^>]*?>.*?</iframe>'si", 3236 "'<style[^>]*?>.*?</style>'si", 3237 "'<meta[^>]*?>'si"); 3238 $string = preg_replace($bad_teg, '', $string); 3234 3235 $bad_tags = array ( 3236 "'<script[^>]*?>.*?</script>'si", 3237 "'<style[^>]*?>.*?</style>'si", 3238 "'<meta[^>]*?>'si", 3239 '/<iframe.*?src=(?!"http:\/\/www\.youtube\.com\/embed\/|"http:\/\/vkontakte\.ru\/video_ext\.php\?).*?>.*?<\/iframe>/i', 3240 '/<iframe.*>.+<\/iframe>/i' 3241 ); 3242 3243 $string = preg_replace($bad_tags, '', $string); 3244 3239 3245 return $string; 3246 3240 3247 } 3241 3248 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -
trunk/includes/bbcode/bbcode.lib.php
r732 r738 1006 1006 $str = '<div class="bb_tag_video">'; 1007 1007 foreach ($elem['val'] as $item) { 1008 1008 1009 if ('item'==$item['type']) { continue; } 1009 $str .= strip_tags($item['str'], '<object><param><embed>'); 1010 1011 $iframe_regexp = '/<iframe.*?src=(?!"http:\/\/www\.youtube\.com\/embed\/|"http:\/\/vkontakte\.ru\/video_ext\.php\?).*?><\/iframe>/i'; 1012 $iframe_regexp2 = '/<iframe.*>.+<\/iframe>/i'; 1013 $item['str'] = preg_replace($iframe_regexp, '', $item['str']); 1014 $item['str'] = preg_replace($iframe_regexp2, '', $item['str']); 1015 1016 $str .= strip_tags($item['str'], '<iframe><object><param><embed>'); 1017 1010 1018 } 1011 1019 $str .= '</div>';
Note: See TracChangeset
for help on using the changeset viewer.
