protected function isUrlMatchingGoal($goal, $pattern_type, $url)
{
$url = Common::unsanitizeInputValue($url);
$goal['pattern'] = Common::unsanitizeInputValue($goal['pattern']);
$match = $this->isGoalPatternMatchingUrl($goal, $pattern_type, $url);
if (!$match) {
// Users may set Goal matching URL as URL encoded
$goal['pattern'] = urldecode($goal['pattern']);
$match = $this->isGoalPatternMatchingUrl($goal, $pattern_type, $url);
}
return $match;
}