Fixed Scrub Relative URLs to include url(something), styling
This commit is contained in:
parent
3cb694dc0b
commit
adbfc48d99
4 changed files with 10 additions and 5 deletions
|
|
@ -32,7 +32,7 @@ def prepare(doc):
|
|||
doc.fields[d] = default_colours[d]
|
||||
|
||||
if not doc.font_size:
|
||||
doc.font_size = "13px"
|
||||
doc.font_size = "14px"
|
||||
|
||||
doc.small_font_size = cstr(cint(doc.font_size[:-2])-2) + 'px'
|
||||
doc.page_border = cint(doc.page_border)
|
||||
|
|
|
|||
|
|
@ -248,6 +248,10 @@ fieldset {
|
|||
border-bottom: 2px solid #999;
|
||||
}
|
||||
|
||||
.sidebar-item a.active {
|
||||
border-bottom: 2px solid #999;
|
||||
}
|
||||
|
||||
html,
|
||||
body {
|
||||
height: 100%;
|
||||
|
|
@ -392,7 +396,6 @@ a.no-decoration {
|
|||
a.active {
|
||||
pointer-events: none;
|
||||
cursor: default;
|
||||
border-bottom: inherit;
|
||||
}
|
||||
|
||||
.page-breadcrumbs .breadcrumb {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
{
|
||||
"creation": "2013-03-25 16:01:33",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-12-20 19:21:48",
|
||||
"modified": "2013-12-20 19:22:48",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
|
|
@ -136,7 +136,7 @@
|
|||
"fieldname": "font_size",
|
||||
"fieldtype": "Select",
|
||||
"label": "Font Size (Text)",
|
||||
"options": "\n12px\n13px\n14px\n15px\n16px"
|
||||
"options": "\n12px\n13px\n14px\n15px\n16px\n17px\n18px"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
|
|
|
|||
|
|
@ -6,7 +6,9 @@ import frappe, re
|
|||
|
||||
def scrub_relative_urls(html):
|
||||
"""prepend a slash before a relative url"""
|
||||
return re.sub("""(src|href)[^\w'"]*['"](?!http|ftp|/|#)([^'" >]+)['"]""", '\g<1> = "/\g<2>"', html)
|
||||
html = re.sub("""(src|href)[^\w'"]*['"](?!http|ftp|/|#)([^'" >]+)['"]""", '\g<1> = "/\g<2>"', html)
|
||||
html = re.sub("""url\((?!http|ftp|/|#)([^\(\)]+)\)""", 'url(/\g<1>)', html)
|
||||
return html
|
||||
|
||||
def can_cache(no_cache=False):
|
||||
return not (frappe.conf.disable_website_cache or no_cache)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue