Merge pull request #11079 from afbjorklund/javascript-security

Address concerns highlighted by code scanning
pull/10384/head
Medya Ghazizadeh 2021-04-12 17:44:01 -07:00 committed by GitHub
commit d03e49602e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -27,7 +27,7 @@
<ul>
{{ range . }}
<li title="{{ .name }}">
<a target="_blank" href="{{ .url }}"><i class="{{ .icon }}"></i> {{ .name }}:</a> {{ .desc }}
<a target="_blank" rel="noopener" href="{{ .url }}"><i class="{{ .icon }}"></i> {{ .name }}:</a> {{ .desc }}
</li>
{{ end }}
</ul>

View File

@ -3,8 +3,8 @@ function initTabs() {
try{
$('.tab-content').find('.tab-pane').each(function(idx, item) {
var navTabs = $(this).closest('.code-tabs').find('.nav-tabs'),
title = $(this).attr('title'),
os = $(this).attr('os');
title = escape($(this).attr('title')),
os = escape($(this).attr('os'));
navTabs.append('<li class="nav-tab '+os+'"><a href="#" class="nav-tab">'+title+'</a></li>');
});