Skip to content
This repository has been archived by the owner on Jul 29, 2022. It is now read-only.

Commit

Permalink
Merge pull request #123 from readium/fix/sanitize-filename
Browse files Browse the repository at this point in the history
Fix broken server if a publication file contains special characters
  • Loading branch information
mickael-menu authored May 7, 2020
2 parents 2e4337d + cae30de commit f022243
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ package org.readium.r2.navigator
/**
* Global Parameters
*/
@Deprecated("Use Publication::localBaseUrlOf() instead")
const val BASE_URL = "http://127.0.0.1"

Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ open class R2EpubActivity : AppCompatActivity(), IR2Activity, IR2Selectable, IR2
getAbsolute(spineItem.href, publicationPath)
}
} else {
"$BASE_URL:$port" + "/" + publicationFileName + spineItem.href
Publication.localUrlOf(filename = publicationFileName, port = port ?: 0, href = spineItem.href)
}
resourcesSingle.add(Pair(resourceIndexSingle, uri))

Expand Down

0 comments on commit f022243

Please sign in to comment.