Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[F] <) and >) converted to smilies [R] [C-Michael83]
#6
Find in inc/class_parser.php

if(version_compare(PHP_VERSION, "5.1.0", ">="))
				{
					$message = preg_replace("#(?<=[^&;\"])".preg_quote($find,"#")."(?=.\W|\"|\W.|\W$)#si", $replace, $message, $remaining, $replacements);
					$remaining -= $replacements;
					if($remaining <= 0)
					{
						break; // Reached the limit
					}
				}
				else
				{
					$message = preg_replace("#(?<=[^&;\"])".preg_quote($find,"#")."(?=.\W|\"|\W.|\W$)#si", $replace, $message, $remaining);
				}

and replace with

$find = preg_quote($find, "#");
				// Fix issues for smileys starting with a ";"
				if($find{0} == ";")
				{
					$find = "(?<!&gt|&lt|&amp)".$find;
				}
				
				if(version_compare(PHP_VERSION, "5.1.0", ">="))
				{
					$message = preg_replace("#(?<=[^\"])".$find."(?=.\W|\"|\W.|\W$)#si", $replace, $message, $remaining, $replacements);
					$remaining -= $replacements;
					if($remaining <= 0)
					{
						break; // Reached the limit
					}
				}
				else
				{
					$message = preg_replace("#(?<=[^\"])".$find."(?=.\W|\"|\W.|\W$)#si", $replace, $message, $remaining);
				}


Messages In This Thread
RE: <) and >) converted to smilies - by Nexus - 2008-10-25, 08:54 PM
RE: [F] <) and >) converted to smilies [R] - by Ryan Gordon - 2008-10-31, 01:56 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)