Security News
How Threat Actors are Abusing GitHub’s File Upload Feature to Host Malware
GitHub is susceptible to a CDN flaw that allows attackers to host malware on any public repository.
@south-paw/react-obfuscate-ts
Advanced tools
Readme
🕵️ A React component to obfuscate contact links and text
email
, tel
, sms
, href
and any other string of text as a child.aria-label
for screen readers to identify the obfuscated element.as
prop for use with other Link components (such as your own UI libraries link component).The component reverses the content in the DOM for you and uses CSS to re-reverse the content so it appears normally to the user, it also replaces the content of the link's href
attribute. When a user hovers, clicks or focuses the element, it is considered "interacted" and has its content un-reversed and the correct href
attribute applied. This ideally makes the link useless for a bot/spammer but ensures it remains user friendly when viewed normally.
import { Obfuscate } from '@south-paw/react-obfuscate-ts';
// use the component's children to create the link and display
<Obfuscate email>hello@example.com</Obfuscate>;
// or specify the email address for the link with custom children
<Obfuscate email="hello@example.com">Email me!</Obfuscate>;
I was inspired to create this package after using the coston/react-obfuscate package for two years. After switching the majority of my own code bases to TypeScript, I was disappointed to see there was no @types
package for this original version and that it wasn't reliably obfuscating it's content in some of the usages I had. I decided that I'd do a variant of that component with a new API, a few minor bug fixes and one that included types as well.
If you find any, please report them here so they can be squashed.
MIT, see the LICENSE file.
FAQs
A React component to obfuscate contact links and text
The npm package @south-paw/react-obfuscate-ts receives a total of 129 weekly downloads. As such, @south-paw/react-obfuscate-ts popularity was classified as not popular.
We found that @south-paw/react-obfuscate-ts demonstrated a healthy version release cadence and project activity because the last version was released less than 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
GitHub is susceptible to a CDN flaw that allows attackers to host malware on any public repository.
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.