Переглянути джерело

fixed conflict

version-14
Nabin Hait 11 роки тому
джерело
коміт
31ec05a9c8
6 змінених файлів з 13 додано та 7 видалено
  1. +1
    -1
      config.json
  2. +2
    -0
      webnotes/core/doctype/communication/communication.py
  3. +4
    -3
      webnotes/public/js/wn/form/formatters.js
  4. +1
    -1
      webnotes/public/js/wn/ui/editor.js
  5. +1
    -1
      webnotes/utils/__init__.py
  6. +4
    -1
      webnotes/utils/email_lib/receive.py

+ 1
- 1
config.json Переглянути файл

@@ -1,6 +1,6 @@
{ {
"base_template": "lib/website/templates/base.html", "base_template": "lib/website/templates/base.html",
"framework_version": "3.9.0",
"framework_version": "3.9.4",
"modules": { "modules": {
"Calendar": { "Calendar": {
"color": "#2980b9", "color": "#2980b9",


+ 2
- 0
webnotes/core/doctype/communication/communication.py Переглянути файл

@@ -10,6 +10,7 @@ from webnotes.webutils import is_signup_enabled
from webnotes.utils import get_url, cstr from webnotes.utils import get_url, cstr
from webnotes.utils.email_lib.email_body import get_email from webnotes.utils.email_lib.email_body import get_email
from webnotes.utils.email_lib.smtp import send from webnotes.utils.email_lib.smtp import send
from webnotes.utils import scrub_urls


class DocType(): class DocType():
def __init__(self, doc, doclist=None): def __init__(self, doc, doclist=None):
@@ -128,6 +129,7 @@ def send_comm_email(d, name, sent_via=None, print_html=None, attachments='[]', s
mail.cc.append(webnotes.conn.get_value("Profile", webnotes.session.user, "email")) mail.cc.append(webnotes.conn.get_value("Profile", webnotes.session.user, "email"))
if print_html: if print_html:
print_html = scrub_urls(print_html)
mail.add_attachment(name.replace(' ','').replace('/','-') + '.html', print_html) mail.add_attachment(name.replace(' ','').replace('/','-') + '.html', print_html)


for a in json.loads(attachments): for a in json.loads(attachments):


+ 4
- 3
webnotes/public/js/wn/form/formatters.js Переглянути файл

@@ -35,9 +35,10 @@ wn.form.formatters = {
if(!value) if(!value)
return ""; return "";
if(docfield && docfield.options) { if(docfield && docfield.options) {
return repl('%(icon)s<a href="#Form/%(doctype)s/%(name)s">%(name)s</a>', {
doctype: docfield.options,
name: value,
return repl('%(icon)s<a href="#Form/%(doctype)s/%(name)s">%(label)s</a>', {
doctype: encodeURIComponent(docfield.options),
name: encodeURIComponent(value),
label: value,
icon: (options && options.no_icon) ? "" : icon: (options && options.no_icon) ? "" :
('<i class="icon-fixed-width '+wn.boot.doctype_icons[docfield.options]+'"></i> ') ('<i class="icon-fixed-width '+wn.boot.doctype_icons[docfield.options]+'"></i> ')
}); });


+ 1
- 1
webnotes/public/js/wn/ui/editor.js Переглянути файл

@@ -125,7 +125,7 @@ bsEditor = Class.extend({
clean_html: function() { clean_html: function() {
var html = this.editor.html() || ""; var html = this.editor.html() || "";
if(!strip(this.editor.text()) && !(this.editor.find("img"))) html = "";
if(!$.trim(this.editor.text()) && !(this.editor.find("img"))) html = "";
// html = html.replace(/(<br>|\s|<div><br><\/div>|&nbsp;)*$/, ''); // html = html.replace(/(<br>|\s|<div><br><\/div>|&nbsp;)*$/, '');


// remove custom typography (use CSS!) // remove custom typography (use CSS!)


+ 1
- 1
webnotes/utils/__init__.py Переглянути файл

@@ -910,7 +910,7 @@ def expand_relative_urls(html):
def quote_urls(html): def quote_urls(html):
def _quote_url(match): def _quote_url(match):
groups = list(match.groups()) groups = list(match.groups())
groups[2] = urllib.quote(groups[2], safe="/:")
groups[2] = urllib.quote(groups[2], safe="~@#$&()*!+=:;,.?/'")
return "".join(groups) return "".join(groups)
return re.sub('(href|src){1}([\s]*=[\s]*[\'"]?)((?:http)[^\'">]+)([\'"]?)', return re.sub('(href|src){1}([\s]*=[\s]*[\'"]?)((?:http)[^\'">]+)([\'"]?)',
_quote_url, html) _quote_url, html)


+ 4
- 1
webnotes/utils/email_lib/receive.py Переглянути файл

@@ -52,7 +52,10 @@ class IncomingMail:
else: else:
# assume that the encoding is utf-8 # assume that the encoding is utf-8
self.subject = self.subject.decode("utf-8") self.subject = self.subject.decode("utf-8")

if not self.subject:
self.subject = "No Subject"
def set_content_and_type(self): def set_content_and_type(self):
self.content, self.content_type = '[Blank Email]', 'text/plain' self.content, self.content_type = '[Blank Email]', 'text/plain'
if self.text_content: if self.text_content:


Завантаження…
Відмінити
Зберегти