Explorar el Código

Merge branch 'develop'

version-14
Pratik Vyas hace 11 años
padre
commit
d3d1abe733
Se han modificado 3 ficheros con 4 adiciones y 2 borrados
  1. +1
    -1
      config.json
  2. +2
    -0
      core/doctype/communication/communication.py
  3. +1
    -1
      webnotes/utils/__init__.py

+ 1
- 1
config.json Ver fichero

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


+ 2
- 0
core/doctype/communication/communication.py Ver fichero

@@ -3,6 +3,7 @@


from __future__ import unicode_literals from __future__ import unicode_literals
import webnotes import webnotes
from webnotes.utils import scrub_urls


class DocType(): class DocType():
def __init__(self, doc, doclist=[]): def __init__(self, doc, doclist=[]):
@@ -108,6 +109,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 loads(attachments): for a in loads(attachments):


+ 1
- 1
webnotes/utils/__init__.py Ver fichero

@@ -933,7 +933,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)

Cargando…
Cancelar
Guardar