Travis build: 45

This commit is contained in:
30secondsofcode
2019-09-08 09:43:18 +00:00
parent 34c8bc5957
commit 625f6966a9
3 changed files with 6 additions and 6 deletions

View File

@@ -1456,7 +1456,7 @@ Renders a link formatted to send an email.
```jsx
function Mailto({ email, subject, body, ...props }) {
return (
<a href={`mailto:${email}?subject=${subject || ''}&body=${body || ''}`}>{props.children}</a>
<a href={`mailto:${email}?subject=${encodeURIComponent(subject) || ''}&body=${encodeURIComponent(body) || ''}`}>{props.children}</a>
);
}
```
@@ -1466,7 +1466,7 @@ function Mailto({ email, subject, body, ...props }) {
```jsx
ReactDOM.render(
<Mailto email="foo@bar.baz" subject="Hello" body="Hello world!">
<Mailto email="foo@bar.baz" subject="Hello & Welcome" body="Hello world!">
Mail me!
</Mailto>,
document.getElementById('root')