Vergleich inc/class_parser.php - 1.6.5 - 1.6.10

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 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 114Zeile 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", "&lt;script$1&gt;$2&lt;/script$3&gt;", $message);

				$message = preg_replace("#<s(cript|tyle)(.*)>(.*)</s(cript|tyle)(.*)>#is", "&lt;s$1$2&gt;$3&lt;/s$4$5&gt;", $message);

			}


			}


			$message = str_replace(array('<?php', '<!--', '-->', '?>', "<br />\n", "<br>\n"), array('&lt;?php', '&lt;!--', '--&gt;', '?&gt;', "\n", "\n"), $message);



			$find = array('<?php', '<!--', '-->', '?>', "<br />\n", "<br>\n");
$replace = array('&lt;?php', '&lt;!--', '--&gt;', '?&gt;', "\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 154Zeile 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 193Zeile 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 533Zeile 535
				}
}
}

				}
}
}

		if($options['strip_tags'] == 1)

		if(isset($options['strip_tags']) && $options['strip_tags'] == 1)

		{
$message = strip_tags($message);
}

		{
$message = strip_tags($message);
}

Zeile 564Zeile 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 627Zeile 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 860Zeile 866
			$url = "http://".$url;
}
$fullurl = $url;

			$url = "http://".$url;
}
$fullurl = $url;





		$url = str_replace('&amp;', '&', $url);
$name = str_replace('&amp;', '&', $name);


		$url = str_replace('&amp;', '&', $url);
$name = str_replace('&amp;', '&', $name);


Zeile 966Zeile 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 1000Zeile 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 1027Zeile 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]";
}