davidanson / check-pages-cli Goto Github PK
View Code? Open in Web Editor NEWChecks various aspects of a web page for correctness.
License: MIT License
Checks various aspects of a web page for correctness.
License: MIT License
Both check-pages-cli and grunt-check-pages show errors if Cyrillic domains in values of the a.href
attribute. Like this:
<a href="https://%D0%B6%D1%83%D1%80%D0%BD%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B9%D0%BC%D0%B8%D1%80.%D1%80%D1%84/avtor/savchenko-boris">Kira Goddess!</a>
KiraEncodedCyrillicDomain.html
:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Kira encoded Cyrillic domain</title>
</head>
<body>
<!-- [INFO] Encoded “https://журнальныймир.рф/avtor/savchenko-boris” URL -->
<a href="https://%D0%B6%D1%83%D1%80%D0%BD%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B9%D0%BC%D0%B8%D1%80.%D1%80%D1%84/avtor/savchenko-boris">Kira Goddess!</a>
</body>
</html>
I run http-server:
D:\SashaDebugging\KiraCheckPages>http-server
Starting up http-server, serving ./
http-server version: 14.1.1
http-server settings:
CORS: disabled
Cache: 3600 seconds
Connection Timeout: 120 seconds
Directory Listings: visible
AutoIndex: visible
Serve GZIP Files: false
Serve Brotli Files: false
Default File Extension: none
Available on:
http://192.168.1.2:8080
http://127.0.0.1:8080
http://127.0.2.2:8080
http://127.0.2.3:8080
Hit CTRL-C to stop the server
In new tab I run check-pages-cli:
check-pages http://127.0.0.1:8080/KiraEncodedCyrillicDomain.html --checkLinks
No errors.
If Latin domains, I get no errors.
D:\SashaDebugging\KiraCheckPages>check-pages http://127.0.0.1:8080/KiraEncodedCyrillicDomain.html --checkLinks
Page: http://127.0.0.1:8080/KiraEncodedCyrillicDomain.html (33ms)
node:events:491
throw er; // Unhandled 'error' event
^
Error: Invalid URI "https:///%d0%b6%d1%83%d1%80%d0%bd%d0%b0%d0%bb%d1%8c%d0%bd%d1%8b%d0%b9%d0%bc%d0%b8%d1%80.%d1%80%d1%84/avtor/savchenko-boris"
at Request.init (C:\Users\SashaChernykh\AppData\Roaming\npm\node_modules\check-pages-cli\node_modules\request\request.js:273:31)
at new Request (C:\Users\SashaChernykh\AppData\Roaming\npm\node_modules\check-pages-cli\node_modules\request\request.js:127:8)
at request (C:\Users\SashaChernykh\AppData\Roaming\npm\node_modules\check-pages-cli\node_modules\request\index.js:53:10)
at C:\Users\SashaChernykh\AppData\Roaming\npm\node_modules\check-pages-cli\node_modules\request\index.js:100:12
at C:\Users\SashaChernykh\AppData\Roaming\npm\node_modules\check-pages-cli\node_modules\check-pages\checkPages.js:143:33
at next (C:\Users\SashaChernykh\AppData\Roaming\npm\node_modules\check-pages-cli\node_modules\check-pages\checkPages.js:435:5)
at Request._callback (C:\Users\SashaChernykh\AppData\Roaming\npm\node_modules\check-pages-cli\node_modules\check-pages\checkPages.js:314:9)
at self.callback (C:\Users\SashaChernykh\AppData\Roaming\npm\node_modules\check-pages-cli\node_modules\request\request.js:185:22)
at Request.emit (node:events:513:28)
at Request.<anonymous> (C:\Users\SashaChernykh\AppData\Roaming\npm\node_modules\check-pages-cli\node_modules\request\request.js:1154:10)
Emitted 'error' event on Request instance at:
at Request.init (C:\Users\SashaChernykh\AppData\Roaming\npm\node_modules\check-pages-cli\node_modules\request\request.js:273:17)
at new Request (C:\Users\SashaChernykh\AppData\Roaming\npm\node_modules\check-pages-cli\node_modules\request\request.js:127:8)
[... lines matching original stack trace ...]
at Request.<anonymous> (C:\Users\SashaChernykh\AppData\Roaming\npm\node_modules\check-pages-cli\node_modules\request\request.js:1154:10)
Node.js v18.9.0
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.