Merge branch 'fix-uriencoding-of-dependencies'

Conflicts:
	www/js/app.js
This commit is contained in:
mossroy 2016-01-11 16:37:29 +01:00
commit 8f884b0480
2 changed files with 4 additions and 4 deletions

View File

@ -143,7 +143,7 @@ function(util) {
} }
// We need to remove the potential parameters in the URL // We need to remove the potential parameters in the URL
titleName = util.removeUrlParameters(titleName); titleName = util.removeUrlParameters(decodeURIComponent(titleName));
titleNameWithNameSpace = nameSpace + '/' + titleName; titleNameWithNameSpace = nameSpace + '/' + titleName;

View File

@ -980,7 +980,7 @@ define(['jquery', 'abstractBackend', 'util', 'cookies','geometry','osabstraction
// It's a standard image contained in the ZIM file // It's a standard image contained in the ZIM file
var imageMatch = image.attr("src").match(regexpImageUrl); var imageMatch = image.attr("src").match(regexpImageUrl);
if (imageMatch) { if (imageMatch) {
var titleName = imageMatch[1]; var titleName = decodeURIComponent(imageMatch[1]);
selectedArchive.getTitleByName(titleName).then(function(title) { selectedArchive.getTitleByName(titleName).then(function(title) {
selectedArchive.readBinaryFile(title, function (readableTitleName, content) { selectedArchive.readBinaryFile(title, function (readableTitleName, content) {
// TODO : add the complete MIME-type of the image (as read from the ZIM file) // TODO : add the complete MIME-type of the image (as read from the ZIM file)
@ -999,7 +999,7 @@ define(['jquery', 'abstractBackend', 'util', 'cookies','geometry','osabstraction
var hrefMatch = link.attr("href").match(regexpMetadataUrl); var hrefMatch = link.attr("href").match(regexpMetadataUrl);
if (hrefMatch) { if (hrefMatch) {
// It's a CSS file contained in the ZIM file // It's a CSS file contained in the ZIM file
var titleName = util.removeUrlParameters(hrefMatch[1]); var titleName = util.removeUrlParameters(decodeURIComponent(hrefMatch[1]));
selectedArchive.getTitleByName(titleName).then(function(title) { selectedArchive.getTitleByName(titleName).then(function(title) {
selectedArchive.readBinaryFile(title, function (readableTitleName, content) { selectedArchive.readBinaryFile(title, function (readableTitleName, content) {
var cssContent = util.uintToString(content); var cssContent = util.uintToString(content);
@ -1038,7 +1038,7 @@ define(['jquery', 'abstractBackend', 'util', 'cookies','geometry','osabstraction
// TODO check that the type of the script is text/javascript or application/javascript // TODO check that the type of the script is text/javascript or application/javascript
if (srcMatch) { if (srcMatch) {
// It's a Javascript file contained in the ZIM file // It's a Javascript file contained in the ZIM file
var titleName = util.removeUrlParameters(srcMatch[1]); var titleName = util.removeUrlParameters(decodeURIComponent(srcMatch[1]));
selectedArchive.getTitleByName(titleName).then(function(title) { selectedArchive.getTitleByName(titleName).then(function(title) {
selectedArchive.readBinaryFile(title, function (readableTitleName, content) { selectedArchive.readBinaryFile(title, function (readableTitleName, content) {
// TODO : I have to disable javascript for now // TODO : I have to disable javascript for now