Use rawurlencode so that the spaces are remplaced by %20 and not +. Will hopefully help with IIS URL Rewriting

This commit is contained in:
Sébastien Lucas 2016-02-13 06:28:56 +01:00
parent 188b15b1b8
commit 2bd02496fe
2 changed files with 6 additions and 6 deletions

View file

@ -132,9 +132,9 @@ class Data extends Base {
if ($config['cops_provide_kepub'] == "1" &&
$this->isEpubValidOnKobo () &&
preg_match("/Kobo/", $_SERVER['HTTP_USER_AGENT'])) {
$href .= urlencode ($this->getUpdatedFilenameKepub ());
$href .= rawurlencode ($this->getUpdatedFilenameKepub ());
} else {
$href .= urlencode ($this->getFilename ());
$href .= rawurlencode ($this->getFilename ());
}
return new Link ($href, $this->getMimeType (), Link::OPDS_ACQUISITION_TYPE, $title);
}