Fix issue 366, Problem when shaaring a link in Reader View of Firefox.

This commit is contained in:
Kevin Canévet 2015-11-08 23:06:21 +01:00 committed by ArthurHoaro
parent 5816801b15
commit ecd051905f

View file

@ -125,6 +125,19 @@ public function __construct($url)
}
}
private function removeFirefoxAboutReader($input){
$output_array = [];
preg_match("%^about://reader\?url=(.*)%", $input, $output_array);
if(!empty($output_array)){
$extractedUrl = preg_replace("%^about://reader\?url=(.*)%", "$1", $input);
$url = urldecode($extractedUrl);
}else{
$url = $input;
}
return $url;
}
/**
* Returns a string representation of this URL
*/
@ -187,7 +200,8 @@ public function cleanup()
{
$this->cleanupQuery();
$this->cleanupFragment();
return $this->toString();
$url = $this->toString();
return $this->removeFirefoxAboutReader($url);
}
/**