Skip to content

Commit 60cf6c0

Browse files
committed
Fix Codacy XSS warnings and CSS template compatibility
1 parent 12bbb71 commit 60cf6c0

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

gcovr-templates/html/gcovr.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1577,7 +1577,7 @@
15771577
a.className = el.className.replace(/\bdisabled\b/, '').trim();
15781578
a.href = href;
15791579
a.title = el.title;
1580-
a.innerHTML = el.innerHTML;
1580+
while (el.firstChild) a.appendChild(el.firstChild.cloneNode(true));
15811581
el.parentNode.replaceChild(a, el);
15821582
}
15831583
} else {
@@ -1586,7 +1586,7 @@
15861586
var span = document.createElement('span');
15871587
span.className = el.className + ' disabled';
15881588
span.title = el.title;
1589-
span.innerHTML = el.innerHTML;
1589+
while (el.firstChild) span.appendChild(el.firstChild.cloneNode(true));
15901590
el.parentNode.replaceChild(span, el);
15911591
} else {
15921592
el.classList.add('disabled');

gcovr-templates/html/style.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,7 +1119,7 @@ body.sidebar-resizing .main-content {
11191119

11201120
.file-list-header {
11211121
display: grid;
1122-
grid-template-columns: minmax(200px, 2fr) minmax(150px, 1fr) 100px 100px 100px{% if SHOW_CONDITION_COVERAGE %} 100px{% endif %}{% if SHOW_DECISION %} 100px{% endif %}{% if SHOW_CALLS %} 100px{% endif %}{% if info.diff_report %} 95px{% endif %};
1122+
grid-template-columns: minmax(200px, 2fr) minmax(150px, 1fr) 100px 100px 100px{% if SHOW_CONDITION_COVERAGE %} 100px{% endif %}{% if SHOW_DECISION %} 100px{% endif %}{% if SHOW_CALLS %} 100px{% endif %}{% if info is defined and info.diff_report %} 95px{% endif %};
11231123
gap: 8px;
11241124
padding: 12px 16px;
11251125
background: var(--bg-tertiary);
@@ -1156,7 +1156,7 @@ body.sidebar-resizing .main-content {
11561156

11571157
.file-row {
11581158
display: grid;
1159-
grid-template-columns: minmax(200px, 2fr) minmax(150px, 1fr) 100px 100px 100px{% if SHOW_CONDITION_COVERAGE %} 100px{% endif %}{% if SHOW_DECISION %} 100px{% endif %}{% if SHOW_CALLS %} 100px{% endif %}{% if info.diff_report %} 95px{% endif %};
1159+
grid-template-columns: minmax(200px, 2fr) minmax(150px, 1fr) 100px 100px 100px{% if SHOW_CONDITION_COVERAGE %} 100px{% endif %}{% if SHOW_DECISION %} 100px{% endif %}{% if SHOW_CALLS %} 100px{% endif %}{% if info is defined and info.diff_report %} 95px{% endif %};
11601160
gap: 8px;
11611161
padding: 4px 16px;
11621162
border-bottom: 1px solid var(--border-muted);

0 commit comments

Comments
 (0)