mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-29 07:00:27 +01:00
Merge pull request #176 from orangemug/fix/noopener-noreferrer
Added rel="noopener noreferrer" to external links.
This commit is contained in:
commit
db2f9efb93
2 changed files with 5 additions and 4 deletions
|
@ -32,7 +32,8 @@ function ToolbarLink(props) {
|
||||||
return <a
|
return <a
|
||||||
className={classnames('maputnik-toolbar-link', props.className)}
|
className={classnames('maputnik-toolbar-link', props.className)}
|
||||||
href={props.href}
|
href={props.href}
|
||||||
target={"blank"}
|
rel="noopener noreferrer"
|
||||||
|
target="_blank"
|
||||||
>
|
>
|
||||||
{props.children}
|
{props.children}
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -126,7 +126,7 @@ class Gist extends React.Component {
|
||||||
const user = gist.user || 'anonymous';
|
const user = gist.user || 'anonymous';
|
||||||
const preview = !!gist.files['index.html'];
|
const preview = !!gist.files['index.html'];
|
||||||
if(preview) {
|
if(preview) {
|
||||||
return <span><a target="_blank" href={"https://bl.ocks.org/"+user+"/"+gist.id}>Preview</a>,{' '}</span>
|
return <span><a target="_blank" rel="noopener noreferrer" href={"https://bl.ocks.org/"+user+"/"+gist.id}>Preview</a>,{' '}</span>
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -144,7 +144,7 @@ class Gist extends React.Component {
|
||||||
<p>
|
<p>
|
||||||
Latest saved gist:{' '}
|
Latest saved gist:{' '}
|
||||||
{this.renderPreviewLink(this)}
|
{this.renderPreviewLink(this)}
|
||||||
<a target="_blank" href={"https://gist.github.com/" + user + "/" + gist.id}>Source</a>
|
<a target="_blank" rel="noopener noreferrer" href={"https://gist.github.com/" + user + "/" + gist.id}>Source</a>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<CopyToClipboard text={maputnikStyleLink}>
|
<CopyToClipboard text={maputnikStyleLink}>
|
||||||
|
@ -177,7 +177,7 @@ class Gist extends React.Component {
|
||||||
value={(this.props.mapStyle.metadata || {})['maputnik:openmaptiles_access_token']}
|
value={(this.props.mapStyle.metadata || {})['maputnik:openmaptiles_access_token']}
|
||||||
onChange={this.changeMetadataProperty.bind(this, "maputnik:openmaptiles_access_token")}/>
|
onChange={this.changeMetadataProperty.bind(this, "maputnik:openmaptiles_access_token")}/>
|
||||||
</InputBlock>
|
</InputBlock>
|
||||||
<a target="_blank" href="https://openmaptiles.com/hosting/">Get your free access token</a>
|
<a target="_blank" rel="noopener noreferrer" href="https://openmaptiles.com/hosting/">Get your free access token</a>
|
||||||
</div>
|
</div>
|
||||||
: null}
|
: null}
|
||||||
{this.renderLatestGist()}
|
{this.renderLatestGist()}
|
||||||
|
|
Loading…
Reference in a new issue