Zeile 6 | Zeile 6 |
---|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* $Id: class_parser.php 5616 2011-09-20 13:24:59Z Tomm $
| * $Id$
|
*/
/*
| */
/*
|
Zeile 114 | Zeile 114 |
---|
} else {
|
} else {
|
while(preg_match("#<script(.*)>(.*)</script(.*)>#is", $message))
| while(preg_match("#<s(cript|tyle)(.*)>(.*)</s(cript|tyle)(.*)>#is", $message))
|
{
|
{
|
$message = preg_replace("#<script(.*)>(.*)</script(.*)>#is", "<script$1>$2</script$3>", $message);
| $message = preg_replace("#<s(cript|tyle)(.*)>(.*)</s(cript|tyle)(.*)>#is", "<s$1$2>$3</s$4$5>", $message);
|
}
|
}
|
$message = str_replace(array('<?php', '<!--', '-->', '?>', "<br />\n", "<br>\n"), array('<?php', '<!--', '-->', '?>', "\n", "\n"), $message);
| $find = array('<?php', '<!--', '-->', '?>', "<br />\n", "<br>\n"); $replace = array('<?php', '<!--', '-->', '?>', "\n", "\n"); $message = str_replace($find, $replace, $message);
|
} // If MyCode needs to be replaced, first filter out [code] and [php] tags.
| } // If MyCode needs to be replaced, first filter out [code] and [php] tags.
|
Zeile 154 | Zeile 156 |
---|
} // Parse Highlights
|
} // Parse Highlights
|
if($this->options['highlight'])
| if(!empty($this->options['highlight']))
|
{ $message = $this->highlight_message($message, $this->options['highlight']); }
| { $message = $this->highlight_message($message, $this->options['highlight']); }
|
Zeile 193 | Zeile 195 |
---|
{ $message = preg_replace_callback("#<((m[^a])|(b[^diloru>])|(s[^aemptu>]))(\s*[^>]*)>#si", create_function( '$matches',
|
{ $message = preg_replace_callback("#<((m[^a])|(b[^diloru>])|(s[^aemptu>]))(\s*[^>]*)>#si", create_function( '$matches',
|
'return htmlspecialchars($matches[0]);'
| 'return htmlspecialchars_uni($matches[0]);'
|
), $message); }
|
), $message); }
|
if($options['nl2br'] !== 0)
| if(!isset($options['nl2br']) || $options['nl2br'] != 0)
|
{ $message = nl2br($message); // Fix up new lines and block level elements
| { $message = nl2br($message); // Fix up new lines and block level elements
|
Zeile 533 | Zeile 535 |
---|
} } }
|
} } }
|
if($options['strip_tags'] == 1)
| if(isset($options['strip_tags']) && $options['strip_tags'] == 1)
|
{ $message = strip_tags($message); }
| { $message = strip_tags($message); }
|
Zeile 564 | Zeile 566 |
---|
"#(o)(nfocus\s?=)#i", "#(o)(nselect\s?=)#i", "#(o)(nunload\s?=)#i",
|
"#(o)(nfocus\s?=)#i", "#(o)(nselect\s?=)#i", "#(o)(nunload\s?=)#i",
|
"#(o)(nkeypress\s?=)#i"
| "#(o)(nkeypress\s?=)#i", "#(o)(nerror\s?=)#i", "#(o)(nreset\s?=)#i", "#(o)(nabort\s?=)#i"
|
); $message = preg_replace($js_array, "$1<strong></strong>$2$4", $message);
| ); $message = preg_replace($js_array, "$1<strong></strong>$2$4", $message);
|
Zeile 627 | Zeile 632 |
---|
do {
|
do {
|
| // preg_replace has erased the message? Restore it... if(!$message) { $message = $previous_message; break; }
|
$previous_message = $message; $message = preg_replace($pattern, $replace, $message, -1, $count); } while($count);
|
$previous_message = $message; $message = preg_replace($pattern, $replace, $message, -1, $count); } while($count);
|
if(!$message) { $message = $previous_message; }
| |
if($text_only == false) {
| if($text_only == false) {
|
Zeile 860 | Zeile 866 |
---|
$url = "http://".$url; } $fullurl = $url;
|
$url = "http://".$url; } $fullurl = $url;
|
|
|
$url = str_replace('&', '&', $url); $name = str_replace('&', '&', $name);
| $url = str_replace('&', '&', $url); $name = str_replace('&', '&', $name);
|
Zeile 966 | Zeile 972 |
---|
return "[video={$video}]{$url}[/video]"; }
|
return "[video={$video}]{$url}[/video]"; }
|
$parsed_url = @parse_url($url);
| $parsed_url = @parse_url(urldecode($url));
|
if($parsed_url == false) {
|
if($parsed_url == false) {
|
return "[video={$video}]{$url}[/video]";;
| return "[video={$video}]{$url}[/video]";
|
} $fragments = array(); if($parsed_url['fragment']) { $fragments = explode("&", $parsed_url['fragment']);
|
} $fragments = array(); if($parsed_url['fragment']) { $fragments = explode("&", $parsed_url['fragment']);
|
}
| }
|
$queries = explode("&", $parsed_url['query']); $input = array();
| $queries = explode("&", $parsed_url['query']); $input = array();
|
Zeile 1000 | Zeile 1006 |
---|
$title = htmlspecialchars_uni($path[3]); break; case "myspacetv":
|
$title = htmlspecialchars_uni($path[3]); break; case "myspacetv":
|
$id = $input['videoid']; // http://myspacetv.com/index.cfm?fuseaction=vids.individual&videoid=fds123
| $id = $path[4]; // http://www.myspace.com/video/fds/fds/123
|
break; case "yahoo":
|
break; case "yahoo":
|
$id = $path[3]; // http://video.yahoo.com/watch/fds123/abc567 $vid = htmlspecialchars_uni($path[2]);
| $id = $path[1]; // http://xy.screen.yahoo.com/fds-123.html // Support for localized portals $domain = explode('.', $parsed_url['host']); if($domain[0] != 'screen') { $local = $domain[0].'.'; } else { $local = ''; }
|
break; case "vimeo": $id = $path[1]; // http://vimeo.com/fds123
| break; case "vimeo": $id = $path[1]; // http://vimeo.com/fds123
|
Zeile 1027 | Zeile 1042 |
---|
return "[video={$video}]{$url}[/video]"; }
|
return "[video={$video}]{$url}[/video]"; }
|
if(empty($id) || ($video == "yahoo" && empty($vid)))
| if(empty($id))
|
{ return "[video={$video}]{$url}[/video]"; }
| { return "[video={$video}]{$url}[/video]"; }
|