Skip to content

Commit 7251cae

Browse files
author
Simon Hunt
committed
Replace usage of .html(...) with .text(...) where possible;
Wrap input with fs.sanitize(...) where .html() must be used. Change-Id: I8e524e4c9c1fb2ddac5081bea3fb5af774c712f7
1 parent a8612b0 commit 7251cae

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

onos-byon-gui/src/main/resources/app/view/byonNetworks/byonNetworks.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
var tr = tbody.append('tr');
1919

2020
function addCell(cls, txt) {
21-
tr.append('td').attr('class', cls).html(txt);
21+
tr.append('td').attr('class', cls).text(txt);
2222
}
2323

2424
addCell('label', friendlyProps[index] + ' :');
@@ -27,9 +27,9 @@
2727

2828
function addHost(tbody, host) {
2929
var tr = tbody.append('tr');
30-
tr.append('td').html(host.mac)
31-
.append('td').html(host.ip)
32-
.append('td').html(host.loc);
30+
tr.append('td').text(host.mac)
31+
.append('td').text(host.ip)
32+
.append('td').text(host.loc);
3333
}
3434

3535
function populatePanel(panel) {
@@ -91,7 +91,9 @@
9191
$log.log('OvByonNetworksCtrl has been created');
9292
}])
9393

94-
.directive('ovByonNetworksDetailsPanel', ['PanelService', 'KeyService',
94+
.directive('ovByonNetworksDetailsPanel',
95+
['PanelService', 'KeyService',
96+
9597
function (ps, ks) {
9698
return {
9799
restrict: 'E',

uiref/src/main/resources/app/view/uiRefTable/uiRefTable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
var tr = tbody.append('tr');
1919

2020
function addCell(cls, txt) {
21-
tr.append('td').attr('class', cls).html(txt);
21+
tr.append('td').attr('class', cls).text(txt);
2222
}
2323
addCell('label', friendlyProps[index] + ' :');
2424
addCell('value', value);

0 commit comments

Comments
 (0)