Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
material-ui-linkify
Advanced tools
Converts links in text to Material-UI Links using the Markdown Linkify library
Converts links in text to Material-UI Links using the Markdown-it Linkify-it library Uses https://github.com/markdown-it/linkify-it Inspired by https://github.com/tasti/react-linkify/
npm install material-ui-linkify --save
<MuiLinkify>
<Typography variant="body1">
See source code at https://github.com/alexplumb/material-ui-linkify
</Typography>
</MuiLinkify>
schema - A linkify-it schema for adding linkify processors. Example for adding Twitter:
{
'@': {
validate (text, pos, self) {
const tail = text.slice(pos);
if (!self.re.twitter) {
self.re.twitter = new RegExp(
`^([a-zA-Z0-9_]){1,15}(?!_)(?=$|${self.re.src_ZPCc})`,
);
}
if (self.re.twitter.test(tail)) {
// Linkifier allows punctuation chars before prefix,
// but we additionally disable `@` ("@@mention" is invalid)
if (pos >= 2 && tail[pos - 2] === '@') {
return false;
}
return tail.match(self.re.twitter)[0].length;
}
return 0;
},
normalize: (match) => {
match.url = `https://twitter.com/${match.url.replace(/^@/, '')}`;
},
},
}
options: See https://github.com/markdown-it/linkify-it#new-linkifyitschemas-options for options
LinkProps: Properties that you want to pass along to the Link component. See https://material-ui.com/api/link/ for the full API
hostnameOnly: Forces certain schemas to only display the hostnames for matched links (boolean, default: false)
hostnameSchemas: When hostnameOnly
is set to true
, pass an array of schemas that determines which types of URLs to be truncated. (default: https:, http:, ftp:, //
)
This library requires the URL interface. If you need to support IE, make sure to install a polyfill.
Uses the MIT License
FAQs
Converts links in text to Material-UI Links using the Markdown Linkify library
We found that material-ui-linkify 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
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.