Skip to content
This repository has been archived by the owner on Jun 2, 2020. It is now read-only.

Commit

Permalink
MOBILE-654 Fixing iOs problem with german umlauts
Browse files Browse the repository at this point in the history
  • Loading branch information
jleyva committed Sep 1, 2014
1 parent fc89fe1 commit de0a7b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mm.js
Original file line number Diff line number Diff line change
Expand Up @@ -2195,7 +2195,7 @@ var MM = {
if (typeof(MM.plugins.contents.templates.mimetypes[extension])!= "undefined") {
mimetype = MM.plugins.contents.templates.mimetypes[extension];
}
if (window.plugins.webintent) {
if (MM.deviceOS == 'android' && window.plugins.webintent) {
var iParams = {
action: "android.intent.action.VIEW",
url: link,
Expand Down
5 changes: 5 additions & 0 deletions plugins/contents/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,11 @@ define(templates,function (sectionsTpl, contentsTpl, folderTpl, mimeTypes) {
filename = decodeURIComponent(filename);
filename = filename.replace(/\s/g, "_");

// iOs doesn't like names not encoded.
if (MM.deviceOS == 'ios') {
filename = encodeURIComponent(filename);
}

// We store in the sdcard the contents in site/course/modname/id/contentIndex/filename
var path = MM.config.current_site.id + "/" + courseId + "/" + modId;

Expand Down

0 comments on commit de0a7b1

Please sign in to comment.