
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.
w3c-validate
Advanced tools
A node.js library for testing web responses against the w3c html validator. Inspired by [w3cjs](https://github.com/thomasdavis/w3cjs), but based purely on buffers.
A node.js library for testing web responses against the w3c html validator. Inspired by w3cjs, but based purely on buffers.
Use with your tests.
npm install w3c-validate
var w3c = require('w3c-validate').createValidator();
w3c.validate('<html> ... </html>', function (err) {
if (err) {
console.error(err); // error includes [{message, context}] to help understand validation errors
} else {
console.log('Valid! Hurray!');
}
});
var request = require('supertest')
, express = require('express')
, w3c = require('w3c-validate').createValidator();
var app = express();
app.get('/page', function(req, res){
res.send(200,
'<!DOCTYPE html>' +
'<html lang="en">' +
'<head><title>Hello</title></head>' +
'<body>World</body>' +
'</html>');
});
describe('html validation', function(){
it('page should have no html errors', function(done){
request(app)
.get('/page')
.expect(200)
.end(function(err, res){
if (err) return done(err);
w3c.validate(res.text, done);
});
})
})
Sometimes, you'll have W3C Validation errors that you just want to ignore. Once you've identified the exact error message, you can pass that to the factory method. The validator will ignore these.
var w3c = require('w3c-validate').createValidator([
'Attribute xmlns:fb not allowed here.'
]);
To run the test suite first invoke the following command within the repo, installing the development dependencies:
npm install
then run the tests:
npm test
FAQs
A node.js library for testing web responses against the w3c html validator. Inspired by [w3cjs](https://github.com/thomasdavis/w3cjs), but based purely on buffers.
The npm package w3c-validate receives a total of 7 weekly downloads. As such, w3c-validate popularity was classified as not popular.
We found that w3c-validate demonstrated a not healthy version release cadence and project activity because the last version was released 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.