Skip to content

Commit

Permalink
Strip fewer attributes from static google links
Browse files Browse the repository at this point in the history
Apply same exceptions when stripping attributes from static Google link
shims in hangouts and google docs.
  • Loading branch information
bcyphers committed Oct 4, 2018
1 parent 1e021ad commit 105b8fe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/js/firstparties/google-static.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ function unwrapLink(a) {
// remove all attributes from a link except for target
for (let i = a.attributes.length - 1; i >= 0; --i) {
const attr = a.attributes[i];
if (attr.name !== "target") {
if (attr.name !== 'target' && attr.name !== 'class' &&
!attr.name.startsWith('aria-')) {
a.removeAttribute(attr.name);
}
}
Expand Down

0 comments on commit 105b8fe

Please sign in to comment.