Vergleich inc/class_parser.php - 1.8.20 - 1.8.24

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 368Zeile 368

if($mybb->settings['allowfontmycode'] == 1)
{


if($mybb->settings['allowfontmycode'] == 1)
{

			$nestable_mycode['font']['regex'] = "#\[font=([a-z0-9 ,\-_'\"]+)\](.*?)\[/font\]#si";
$nestable_mycode['font']['replacement'] = "<span style=\"font-family: $1;\" class=\"mycode_font\">$2</span>";

			$nestable_mycode['font']['regex'] = "#\[font=(\"?)([a-z0-9 ,\-_']+)\\1\](.*?)\[/font\]#si";
$nestable_mycode['font']['replacement'] = "<span style=\"font-family: $2;\" class=\"mycode_font\">$3</span>";


++$nestable_count;
}


++$nestable_count;
}

Zeile 1536Zeile 1536
			return "[video={$video}]{$url}[/video]";
}


			return "[video={$video}]{$url}[/video]";
}


		$id = htmlspecialchars_uni($id);

		$id = $this->encode_url($id);


eval("\$video_code = \"".$templates->get("video_{$video}_embed", 1, 0)."\";");
return $video_code;


eval("\$video_code = \"".$templates->get("video_{$video}_embed", 1, 0)."\";");
return $video_code;

Zeile 1594Zeile 1594

// Links should end with slashes, numbers, characters and braces but not with dots, commas or question marks
// Don't create links within existing links (handled up-front in the callback function).


// Links should end with slashes, numbers, characters and braces but not with dots, commas or question marks
// Don't create links within existing links (handled up-front in the callback function).

		$message = preg_replace_callback("#<a\\s[^>]*>.*?</a>|([\s\(\)\[\>])(http|https|ftp|news|irc|ircs|irc6){1}://([^\/\"\s\<\[\.]+\.([^\/\"\s\<\[\.]+\.)*[\w]+(:[0-9]+)?(/([^\"\s<\[]|\[\])*)?([\w\/\)]))#ius", array($this, 'mycode_auto_url_callback'), $message);
$message = preg_replace_callback("#<a\\s[^>]*>.*?</a>|([\s\(\)\[\>])(www|ftp)\.(([^\/\"\s\<\[\.]+\.)*[\w]+(:[0-9]+)?(/([^\"\s<\[]|\[\])*)?([\w\/\)]))#ius", array($this, 'mycode_auto_url_callback'), $message);

		$message = preg_replace_callback("#<a\\s[^>]*>.*?</a>|([\s\(\)\[\>])(http|https|ftp|news|irc|ircs|irc6){1}(://)([^\/\"\s\<\[\.]+\.([^\/\"\s\<\[\.]+\.)*[\w]+(:[0-9]+)?(/([^\"\s<\[]|\[\])*)?([\w\/\)]))#ius", array($this, 'mycode_auto_url_callback'), $message);
$message = preg_replace_callback("#<a\\s[^>]*>.*?</a>|([\s\(\)\[\>])(www|ftp)(\.)(([^\/\"\s\<\[\.]+\.)*[\w]+(:[0-9]+)?(/([^\"\s<\[]|\[\])*)?([\w\/\)]))#ius", array($this, 'mycode_auto_url_callback'), $message);

		$message = my_substr($message, 1);

return $message;

		$message = my_substr($message, 1);

return $message;

Zeile 1618Zeile 1618

$external = '';
// Allow links like http://en.wikipedia.org/wiki/PHP_(disambiguation) but detect mismatching braces


$external = '';
// Allow links like http://en.wikipedia.org/wiki/PHP_(disambiguation) but detect mismatching braces

		while(my_substr($matches[3], -1) == ')')

		while(my_substr($matches[4], -1) == ')')

		{

		{

			if(substr_count($matches[3], ')') > substr_count($matches[3], '('))

			if(substr_count($matches[4], ')') > substr_count($matches[4], '('))

			{

			{

				$matches[3] = my_substr($matches[3], 0, -1);

				$matches[4] = my_substr($matches[4], 0, -1);

				$external = ')'.$external;
}
else

				$external = ')'.$external;
}
else

Zeile 1631Zeile 1631
			}

// Example: ([...] http://en.wikipedia.org/Example_(disambiguation).)

			}

// Example: ([...] http://en.wikipedia.org/Example_(disambiguation).)

			$last_char = my_substr($matches[3], -1);

			$last_char = my_substr($matches[4], -1);

			while($last_char == '.' || $last_char == ',' || $last_char == '?' || $last_char == '!')
{

			while($last_char == '.' || $last_char == ',' || $last_char == '?' || $last_char == '!')
{

				$matches[3] = my_substr($matches[3], 0, -1);

				$matches[4] = my_substr($matches[4], 0, -1);

				$external = $last_char.$external;

				$external = $last_char.$external;

				$last_char = my_substr($matches[3], -1);

				$last_char = my_substr($matches[4], -1);

			}
}

			}
}

		if(in_array(strtolower($matches[2]), array('www', 'ftp')))
{
$url = "{$matches[2]}.{$matches[3]}";
}
else
{
$url = "{$matches[2]}://{$matches[3]}";
}

		$url = "{$matches[2]}{$matches[3]}{$matches[4]}";









return $matches[1].$this->mycode_parse_url($url, $url).$external;
}


return $matches[1].$this->mycode_parse_url($url, $url).$external;
}

Zeile 1815Zeile 1808
			"#\[img=([1-9][0-9]*)x([1-9][0-9]*)\](\r\n?|\n?)(https?://([^<>\"']+?))\[/img\]#is",
"#\[url=((?!javascript)[a-z]+?://)([^\r\n\"<]+?)\](.+?)\[/url\]#si",
"#\[url=((?!javascript:)[^\r\n\"<&\(\)]+?)\](.+?)\[/url\]#si",

			"#\[img=([1-9][0-9]*)x([1-9][0-9]*)\](\r\n?|\n?)(https?://([^<>\"']+?))\[/img\]#is",
"#\[url=((?!javascript)[a-z]+?://)([^\r\n\"<]+?)\](.+?)\[/url\]#si",
"#\[url=((?!javascript:)[^\r\n\"<&\(\)]+?)\](.+?)\[/url\]#si",

 
			"#\[attachment=([0-9]+?)\]#i",

		);

$replace = array(

		);

$replace = array(

Zeile 1823Zeile 1817
			"$4",
"$3 ($1$2)",
"$2 ($1)",

			"$4",
"$3 ($1$2)",
"$2 ($1)",

 
			"",

		);

$messageBefore = "";

		);

$messageBefore = "";