Skip to content

Commit 4bb655f

Browse files
committed
Set .text instead of .html in tooltips
1 parent 7165b87 commit 4bb655f

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

kahuna/public/js/components/gr-tooltip/gr-tooltip.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ tooltip.directive('grTooltip', [
2323
// Use .titip-content for HTML tooltips
2424
const content = attrs.grTooltip || '';
2525
const contentSpan = angular.element('<span class="titip-content"></span>');
26-
contentSpan.html(content);
26+
contentSpan.text(content);
2727
element.append(contentSpan);
2828
} else {
2929
// Use data-title for plain text tooltips
@@ -35,7 +35,7 @@ tooltip.directive('grTooltip', [
3535
if (autoUpdates) {
3636
$scope.$watch(() => attrs.grTooltip, onValChange(newTooltip => {
3737
if (attrs.grTooltipHtml !== undefined) {
38-
element.find('.titip-content').html(newTooltip);
38+
element.find('.titip-content').text(newTooltip);
3939
} else {
4040
element.attr('data-title', newTooltip);
4141
}

kahuna/public/js/leases/leases.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ leases.controller('LeasesCtrl', [
209209
};
210210

211211
ctrl.toolTip = (lease) => {
212-
return Boolean(lease.leasedBy) ? `leased by: ${lease.leasedBy}<br> leased at: ${moment(lease.createdAt).format('D MMM YYYY, HH:mm')}` : ``;
212+
return Boolean(lease.leasedBy) ? `leased by: ${lease.leasedBy}\nleased at: ${moment(lease.createdAt).format('D MMM YYYY, HH:mm')}` : ``;
213213
};
214214

215215
ctrl.inactiveLeases = (leases) => {

0 commit comments

Comments
 (0)