Skip to content

Commit 7789bf1

Browse files
authored
Merge pull request #81 from rapid7/support-spaces-in-pretty-url-name
Support special characters in the clipboard target selector
2 parents 2b4e577 + 1671ff8 commit 7789bf1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

views/configure.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class Configure extends React.Component {
6262
<ul className='list-group scrollable-list' id='recent-logins'>{
6363
Object.keys(this.props.metadataUrls).map((key) => {
6464
const pretty = this.props.metadataUrls[key];
65-
const prettyId = `#${pretty}`;
65+
const urlSelector = `[name="${pretty}"]`;
6666

6767
return (
6868
<li className='list-group-item' key={key}>
@@ -74,12 +74,12 @@ class Configure extends React.Component {
7474
<div className='input-group'>
7575
<input
7676
className='form-control' defaultValue={key}
77-
id={pretty} readonly // eslint-disable-line react/no-unknown-property
77+
name={pretty} readonly // eslint-disable-line react/no-unknown-property
7878
/>
7979
<span className='input-group-btn'>
8080
<button
8181
className='btn btn-default copy-to-clipboard-button'
82-
data-clipboard-target={prettyId}
82+
data-clipboard-target={urlSelector}
8383
><span className='glyphicon glyphicon-copy'/></button>
8484
</span>
8585
</div>

0 commit comments

Comments
 (0)