plugins: Better fix for LGTM security warning
parent
a102bbfbef
commit
d9c2778d17
|
@ -84,12 +84,12 @@ $(document).ready(() => {
|
|||
|
||||
for (const attr in plugin) {
|
||||
if (attr === 'name') { // Hack to rewrite URLS into name
|
||||
const link = $('<a href="">'); // intentional null href
|
||||
link.attr('href', `https://npmjs.org/package/${plugin.name}`);
|
||||
link.attr('plugin', 'Plugin details');
|
||||
link.attr('rel', 'noopener noreferrer');
|
||||
link.attr('target', '_blank');
|
||||
link.text(plugin.name.substr(3));
|
||||
const link = $('<a>')
|
||||
.attr('href', `https://npmjs.org/package/${plugin.name}`)
|
||||
.attr('plugin', 'Plugin details')
|
||||
.attr('rel', 'noopener noreferrer')
|
||||
.attr('target', '_blank')
|
||||
.text(plugin.name.substr(3));
|
||||
row.find('.name').append(link);
|
||||
} else {
|
||||
row.find(`.${attr}`).text(plugin[attr]);
|
||||
|
|
Loading…
Reference in New Issue