* Replace a typeof test against undefined with comparison against a string * Add rel='noopener noreferrer' attributes to target='_blank' links * Remove a duplicate object property definition * Remove superfluous argument to function call * Remove some variable declarations for which the assigned value is never read * Remove an assignment to a variable that is never readversion-14
@@ -36,6 +36,6 @@ | |||||
<li>{%= __("Apart from System Manager, roles with Set User Permissions right can set permissions for other users for that Document Type.") %}</li> | <li>{%= __("Apart from System Manager, roles with Set User Permissions right can set permissions for other users for that Document Type.") %}</li> | ||||
</ol> | </ol> | ||||
<p>{%= __("If these instructions where not helpful, please add in your suggestions on GitHub Issues.") %} | <p>{%= __("If these instructions where not helpful, please add in your suggestions on GitHub Issues.") %} | ||||
<a href="https://github.com/frappe/frappe/issues" target="_blank">{%= __("Submit an Issue") %}</a> | |||||
<a href="https://github.com/frappe/frappe/issues" target="_blank" rel="noopener noreferrer">{%= __("Submit an Issue") %}</a> | |||||
</p> | </p> | ||||
</div> | </div> |
@@ -5,7 +5,7 @@ | |||||
<div class="media"> | <div class="media"> | ||||
<div class="pull-right app-buttons"> | <div class="pull-right app-buttons"> | ||||
<a class="btn btn-default btn-xs" | <a class="btn btn-default btn-xs" | ||||
href="{{ app.app_url }}" target="_blank">{{ __("Website") }}</a> | |||||
href="{{ app.app_url }}" target="_blank" rel="noopener noreferrer">{{ __("Website") }}</a> | |||||
{% if (app.installed) { %} | {% if (app.installed) { %} | ||||
<button class="btn btn-danger btn-xs btn-remove" | <button class="btn btn-danger btn-xs btn-remove" | ||||
data-title="{{ app.app_title }}" | data-title="{{ app.app_title }}" | ||||
@@ -21,7 +21,7 @@ | |||||
{{ f[1] }} | {{ f[1] }} | ||||
</td> | </td> | ||||
<td> | <td> | ||||
<a href="{{ f[0] }}" target="_blank">{{ f[0] }}</a> | |||||
<a href="{{ f[0] }}" target="_blank" rel="noopener noreferrer">{{ f[0] }}</a> | |||||
</td> | </td> | ||||
<td> | <td> | ||||
{{ f[2] }} | {{ f[2] }} | ||||
@@ -110,7 +110,7 @@ | |||||
{% $.each(data.attachments, function(i, a) { %} | {% $.each(data.attachments, function(i, a) { %} | ||||
<div class="ellipsis"> | <div class="ellipsis"> | ||||
<a href="{%= encodeURI(a.file_url).replace(/#/g, \'%23\') %}" | <a href="{%= encodeURI(a.file_url).replace(/#/g, \'%23\') %}" | ||||
class="text-muted small" target="_blank"> | |||||
class="text-muted small" target="_blank" rel="noopener noreferrer"> | |||||
<i class="fa fa-paperclip"></i> | <i class="fa fa-paperclip"></i> | ||||
{%= a.file_url.split("/").slice(-1)[0] %} | {%= a.file_url.split("/").slice(-1)[0] %} | ||||
{% if (a.is_private) { %} | {% if (a.is_private) { %} | ||||
@@ -4,7 +4,6 @@ frappe.avatar = function(user, css_class, title) { | |||||
if(user) { | if(user) { | ||||
// desk | // desk | ||||
var user_info = frappe.user_info(user); | var user_info = frappe.user_info(user); | ||||
var image = frappe.utils.get_file_link(user_info.image); | |||||
} else { | } else { | ||||
// website | // website | ||||
user_info = { | user_info = { | ||||
@@ -23,7 +23,7 @@ function get_query_params(query_string) { | |||||
} | } | ||||
if (key in query_params) { | if (key in query_params) { | ||||
if (typeof query_params[key] === undefined) { | |||||
if (typeof query_params[key] === "undefined") { | |||||
query_params[key] = []; | query_params[key] = []; | ||||
} else if (typeof query_params[key] === "string") { | } else if (typeof query_params[key] === "string") { | ||||
query_params[key] = [query_params[key]]; | query_params[key] = [query_params[key]]; | ||||
@@ -3,8 +3,6 @@ | |||||
$(document).on("toolbar_setup", function() { | $(document).on("toolbar_setup", function() { | ||||
var help_links = []; | var help_links = []; | ||||
var support_link = "#upgrade"; | |||||
var chat_link = "#upgrade"; | |||||
var limits = frappe.boot.limits; | var limits = frappe.boot.limits; | ||||
if(frappe.boot.expiry_message) { | if(frappe.boot.expiry_message) { | ||||
@@ -24,7 +22,7 @@ $(document).on("toolbar_setup", function() { | |||||
} | } | ||||
if(limits.support_email) { | if(limits.support_email) { | ||||
support_link = 'mailto:'+frappe.boot.limits.support_email; | |||||
var support_link = 'mailto:'+frappe.boot.limits.support_email; | |||||
help_links.push('<li><a href="'+support_link+'">' + frappe._('Email Support') + '</a></li>'); | help_links.push('<li><a href="'+support_link+'">' + frappe._('Email Support') + '</a></li>'); | ||||
} | } | ||||
@@ -28,7 +28,7 @@ | |||||
{%= __("My Settings") %}</a></li> | {%= __("My Settings") %}</a></li> | ||||
<li><a href="#" onclick="return frappe.ui.toolbar.clear_cache();"> | <li><a href="#" onclick="return frappe.ui.toolbar.clear_cache();"> | ||||
{%= __("Reload") %}</a></li> | {%= __("Reload") %}</a></li> | ||||
<li><a href="/index" target="_blank"> | |||||
<li><a href="/index" target="_blank" rel="noopener noreferrer"> | |||||
{%= __("View Website") %}</a></li> | {%= __("View Website") %}</a></li> | ||||
<li><a href="#background_jobs"> | <li><a href="#background_jobs"> | ||||
{%= __("Background Jobs") %}</a></li> | {%= __("Background Jobs") %}</a></li> | ||||
@@ -54,7 +54,7 @@ | |||||
<li class="divider"></li> | <li class="divider"></li> | ||||
<li> | <li> | ||||
<a data-link-type="documentation" | <a data-link-type="documentation" | ||||
data-path="/documentation/index" target="_blank">{{ __("Documentation") }}</a> | |||||
data-path="/documentation/index" target="_blank" rel="noopener noreferrer">{{ __("Documentation") }}</a> | |||||
</li> | </li> | ||||
<li class="divider documentation-links"></li> | <li class="divider documentation-links"></li> | ||||
<li><a href="#" onclick="return frappe.ui.toolbar.show_about();"> | <li><a href="#" onclick="return frappe.ui.toolbar.show_about();"> | ||||
@@ -767,7 +767,6 @@ frappe.views.TreeGridReport = frappe.views.GridReportWithPlot.extend({ | |||||
}, | }, | ||||
tree_formatter: function (row, cell, value, columnDef, dataContext) { | tree_formatter: function (row, cell, value, columnDef, dataContext) { | ||||
var me = frappe.cur_grid_report; | var me = frappe.cur_grid_report; | ||||
value = value.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"); | |||||
var data = me.data; | var data = me.data; | ||||
var spacer = "<span style='display:inline-block;height:1px;width:" + | var spacer = "<span style='display:inline-block;height:1px;width:" + | ||||
(15 * dataContext["indent"]) + "px'></span>"; | (15 * dataContext["indent"]) + "px'></span>"; | ||||
@@ -228,7 +228,6 @@ frappe.views.QueryReport = Class.extend({ | |||||
//Render Report in HTML | //Render Report in HTML | ||||
var html = frappe.render_template("print_template", { | var html = frappe.render_template("print_template", { | ||||
columns:columns, | |||||
content:content, | content:content, | ||||
title:__(this.report_name), | title:__(this.report_name), | ||||
base_url: base_url, | base_url: base_url, | ||||
@@ -35,7 +35,7 @@ | |||||
{%- if allow_print and not is_list and not _login_required -%} | {%- if allow_print and not is_list and not _login_required -%} | ||||
<div class='text-right'> | <div class='text-right'> | ||||
<a class='text-muted small' href='/printview?doctype={{ doc.doctype}}&name={{ doc.name }} | <a class='text-muted small' href='/printview?doctype={{ doc.doctype}}&name={{ doc.name }} | ||||
{%- if print_format -%}&format={{ print_format }}{%- endif -%}' target="_blank"> | |||||
{%- if print_format -%}&format={{ print_format }}{%- endif -%}' target="_blank" rel="noopener noreferrer"> | |||||
<i class='fa fa-print'></i> {{ _("Print") }}</a> | <i class='fa fa-print'></i> {{ _("Print") }}</a> | ||||
</div> | </div> | ||||
{%- endif -%} | {%- endif -%} | ||||
@@ -250,7 +250,7 @@ | |||||
<div class="row"> | <div class="row"> | ||||
<div class="col-sm-9"> | <div class="col-sm-9"> | ||||
<p class="text-muted"> | <p class="text-muted"> | ||||
<a class="btn btn-default btn-sm" href="{{ doc.route }}" target="_blank"> | |||||
<a class="btn btn-default btn-sm" href="{{ doc.route }}" target="_blank" rel="noopener noreferrer"> | |||||
{{ web_page_link_text }}</a> | {{ web_page_link_text }}</a> | ||||
</p> | </p> | ||||
</div> | </div> | ||||
@@ -166,7 +166,7 @@ frappe.ready(function() { | |||||
$(this).find('[data-child-row=1]').each(function() { | $(this).find('[data-child-row=1]').each(function() { | ||||
if(!$(this).hasClass('hidden')) { | if(!$(this).hasClass('hidden')) { | ||||
frappe.mandatory_missing_in_last_doc = []; | frappe.mandatory_missing_in_last_doc = []; | ||||
var d = get_data_for_doctype($(this), doctype, true); | |||||
var d = get_data_for_doctype($(this), doctype); | |||||
// set name of child record (if set) | // set name of child record (if set) | ||||
var name = $(this).attr('data-name'); | var name = $(this).attr('data-name'); | ||||