Skip to content

Commit

Permalink
Replace unsafe style attribute assigment (MV3)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanmahieu committed Nov 1, 2023
1 parent b675366 commit 42a3aac
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions common/translation.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017. Stephan Mahieu
* Copyright (c) 2023. Stephan Mahieu
*
* This file is subject to the terms and conditions defined in
* file 'LICENSE', which is part of this source code package.
Expand Down Expand Up @@ -58,7 +58,8 @@ function setUnusedAccessKey(element, child, translation) {
}
// add the key part wrapped inside a span element and apply an underline style
let keyDiv = document.createElement('div');
keyDiv.setAttribute('style', 'text-decoration: underline; display:inline-block;');
keyDiv.style.display = 'inline-block';
keyDiv.style.textDecoration = 'underline';
keyDiv.appendChild(document.createTextNode(key));
element.appendChild(keyDiv);
// add the remainder of the label
Expand Down

0 comments on commit 42a3aac

Please sign in to comment.