Add noreferrer noopener to external URL
issue9089 review289401002
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
* Add noreferrer noopener to external URL (issue9089)
|
||||
* Manage readonly dates in calendar view
|
||||
* Manage editable on calendar view
|
||||
* Manage named separator as label
|
||||
|
||||
+2
-1
@@ -3210,7 +3210,8 @@
|
||||
.append(jQuery('<a/>', {
|
||||
'class': 'btn btn-link',
|
||||
href: Sao.config.bug_url,
|
||||
target: '_blank'
|
||||
target: '_blank',
|
||||
rel: 'noreferrer noopener',
|
||||
}).text(Sao.i18n.gettext('Report Bug')))));
|
||||
jQuery('<button/>', {
|
||||
'class': 'btn btn-primary',
|
||||
|
||||
+3
-1
@@ -3915,7 +3915,8 @@ function eval_pyson(value){
|
||||
Sao.View.Form.URL._super.init.call(this, view, attributes);
|
||||
this.button = jQuery('<a/>', {
|
||||
'class': 'btn btn-default',
|
||||
'target': '_new'
|
||||
'target': '_blank',
|
||||
'rel': 'noreferrer noopener',
|
||||
}).appendTo(jQuery('<span/>', {
|
||||
'class': 'input-group-btn'
|
||||
}).appendTo(this.group));
|
||||
@@ -3997,6 +3998,7 @@ function eval_pyson(value){
|
||||
this.button = jQuery('<a/>', {
|
||||
'class': 'btn btn-lnk',
|
||||
'target': '_blank',
|
||||
'rel': 'noreferrer noopener',
|
||||
}).text(attributes.string).appendTo(this.el);
|
||||
if (attributes.translate) {
|
||||
var button = jQuery('<button/>', {
|
||||
|
||||
+4
-4
@@ -1870,7 +1870,8 @@
|
||||
var cell;
|
||||
if (this.protocol) {
|
||||
cell = jQuery('<a/>', {
|
||||
'target': '_new'
|
||||
'target': '_blank',
|
||||
'rel': 'noreferrer noopener',
|
||||
});
|
||||
cell.append(jQuery('<img/>'));
|
||||
cell.click({'cell': cell}, this.clicked.bind(this));
|
||||
@@ -1911,7 +1912,7 @@
|
||||
break;
|
||||
}
|
||||
}
|
||||
cell.attr('src', value);
|
||||
cell.attr('href', value);
|
||||
}
|
||||
if (this.icon) {
|
||||
if (this.icon in record.model.fields) {
|
||||
@@ -1951,8 +1952,7 @@
|
||||
return cell;
|
||||
},
|
||||
clicked: function(event) {
|
||||
event.preventDefault(); // prevent edition
|
||||
window.open(event.data.cell.attr('src'), '_blank');
|
||||
event.stopPropagation(); // prevent edition
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user