Security News
The Dark Side of Open Source
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
react-protected-mailto
Advanced tools
Readme
Fork of react-obfuscated that went it's own way.
The user passes the contact link as an email, tel, sms, or facetime
prop. The component obfuscates href data until an onClick event. Links are given their proper URL schemes (mailto, facetime, etc.) The link is rendered in reverse in the dom, but reversed again with css. This making the link useless for spammers, but user friendly on screen.
The world needs obfuscated links that display the link in a friendly way.
npm install --save react-protected-mailto
import React from 'react'
import Mailto from 'react-protected-mailto'
export default () => (
<p>
Phone: <Mailto tel='205-454-1234' /><br />
Email: <Mailto
email='hello@coston.cool'
headers={
{subject:'Question from the website'},
{cc:'friend@coston.cool'}
}/>
</p>
)
<p>
Phone: <a href="obfuscated" style="direction: rtl; unicode-bidi: bidi-override;">4321-454-502</a><br>
Email: <a href="obfuscated" style="direction: rtl; unicode-bidi: bidi-override;">looc.notsoc@olleh</a>
</p>
<p>
Phone: <a href="tel:205-454-1234">205-454-1234</a><br>
Email: <a href="mailto:hello@coston.cool&subject=Question%20from%20the%20website&cc=friend@coston.cool">hello@coston.cool</a>
</p>
Prop | Type | Argument | Default | Description
-------------- | --------- | ------------ | --------------- | ------------------------------------------
email | string
| <optional>
| null
| email address of the intended recipient
tel | string
| <optional>
| null
| telephone number of the intended recipient
sms | string
| <optional>
| null
| sms number of the intended recipient
facetime | string
| <optional>
| null
| facetime address of the intended recipient
headers | object
| <optional>
| null
| subject, cc, bcc, body, etc
obfuscate | boolean
| <optional>
| true
| set to false to disable obfuscation
obfuscatedHref | string
| <optional>
| click-to-open
| text to put in a href
npm run build
react-protected-mailto is awesome thanks to these community members:
Please help make this react component better. Submit any issue and/or make a pull request!
Licensed under the MIT license.
FAQs
React component to protect email addresses from crawlers.
The npm package react-protected-mailto receives a total of 88 weekly downloads. As such, react-protected-mailto popularity was classified as not popular.
We found that react-protected-mailto demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
Research
Security News
The Socket Research team found this npm package includes code for collecting sensitive developer information, including your operating system username, Git username, and Git email.
Security News
OpenJS is warning of social engineering takeovers targeting open source projects after receiving a credible attempt on the foundation.