if (substr($cmd, -2, 2) == 'js') $outputMode = 1;
// Handle an URL here
- $replacer = "\" . encodeUrl('" . $matches[3][$key] . "', " . $outputMode . ") . \"";
+ $replacer = "\" . encodeUrl(\"" . $matches[3][$key] . "\", " . $outputMode . ") . \"";
// Replace it
$code = str_replace($matches[0][$key], $replacer, $code);