Skip to content

Commit

Permalink
Use rel=noopener for _blank anchors (#7914)
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-marcacci authored and ryanhamley committed Feb 18, 2019
1 parent 0a1aeda commit c58b24c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/ui/control/attribution_control.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ class AttributionControl {
return acc;
}, `?`);
editLink.href = `${config.FEEDBACK_URL}/${paramString}${this._map._hash ? this._map._hash.getHashString(true) : ''}`;
editLink.rel = "noopener";
}
}

Expand Down
1 change: 1 addition & 0 deletions src/ui/control/logo_control.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class LogoControl {
this._container = DOM.create('div', 'mapboxgl-ctrl');
const anchor = DOM.create('a', 'mapboxgl-ctrl-logo');
anchor.target = "_blank";
anchor.rel = "noopener";
anchor.href = "https://www.mapbox.com/";
anchor.setAttribute("aria-label", "Mapbox logo");
anchor.setAttribute("rel", "noopener");
Expand Down

0 comments on commit c58b24c

Please sign in to comment.