Merge branch 'hotfix'

This commit is contained in:
mbauskar 2017-10-09 15:17:32 +05:30
commit 9439a808a1
4 changed files with 9 additions and 4 deletions

View file

@ -14,7 +14,7 @@ import os, sys, importlib, inspect, json
from .exceptions import *
from .utils.jinja import get_jenv, get_template, render_template, get_email_from_template
__version__ = '9.1.2'
__version__ = '9.1.3'
__title__ = "Frappe Framework"
local = Local()

View file

@ -15,7 +15,7 @@ frappe.upload = {
// make private by default
if (!("options" in opts) || ("options" in opts &&
(!opts.options.toLowerCase()=="public" && !opts.options.toLowerCase()=="image"))) {
(opts.options && !opts.options.toLowerCase()=="public" && !opts.options.toLowerCase()=="image"))) {
opts.is_private = 1;
}

View file

@ -149,7 +149,12 @@ frappe.views.CommunicationComposer = Class.extend({
if (this.frm.subject_field && this.frm.doc[this.frm.subject_field]) {
this.subject = __("Re: {0}", [this.frm.doc[this.frm.subject_field]]);
} else {
this.subject = __(this.frm.doctype) + ': ' + this.frm[this.frm.meta.title_field || name];
let title = this.frm.doc.name;
if(this.frm.meta.title_field && this.frm.doc[this.frm.meta.title_field]
&& this.frm.doc[this.frm.meta.title_field] != this.frm.doc.name) {
title = `${this.frm.doc[this.frm.meta.title_field]} (#${this.frm.doc.name})`;
}
this.subject = `${__(this.frm.doctype)}: ${title}`;
}
}
}

View file

@ -791,7 +791,7 @@ def expand_relative_urls(html):
def _expand_relative_urls(match):
to_expand = list(match.groups())
if not to_expand[2].startswith('mailto'):
if not to_expand[2].startswith('mailto') and not to_expand[2].startswith('data:'):
if not to_expand[2].startswith("/"):
to_expand[2] = "/" + to_expand[2]
to_expand.insert(2, url)