
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@20minutes/draft-convert
Advanced tools
Extensibly serialize & deserialize Draft.js ContentState
Forked version:
validateHTML
function parameter for convertToHTML
For the official readme, check the official project.
validateHTML
(option of convertToHTML
)validateHTML
take the final HTML of the current block as parameter and must return a boolean saying if every thing is ok.
We do have some custom entity/block generation and sometimes, the produced HTML might be wrong. So we validate it using ReactDomServer, like:
import ReactDOMServer from 'react-dom/server'
import { Parser as HtmlToReactParser } from 'html-to-react'
// ...
const html = convertToHTML({
// ...
validateHTML: (html) => {
try {
const htmlToReactParser = HtmlToReactParser()
ReactDOMServer.renderToString(htmlToReactParser.parse(html))
return true
} catch (e) {
return false
}
})(editorState.getCurrentContent());
FAQs
Extensibly serialize & deserialize Draft.js ContentState
We found that @20minutes/draft-convert demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.