Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve logo escaping #3511

Merged
merged 4 commits into from
May 30, 2019
Merged

improve logo escaping #3511

merged 4 commits into from
May 30, 2019

Conversation

chris48s
Copy link
Member

Also prepares a 2.2.1 release for NPM

@chris48s chris48s added npm-package Badge generation and badge templates security Refer to our SECURITY.md policy before opening pull requests that address a security vulnerability labels May 30, 2019
@@ -1,5 +1,6 @@
'use strict'

const Joi = require('joi')
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will want updating to const Joi = require('@hapi/joi') in the context of #3505 I'll sort it out in one or the other depending on which order these get merged in.

@@ -31,7 +32,12 @@ function prependPrefix(s, prefix) {
}

function isDataUrl(s) {
return s !== undefined && /^(data:)([^;]+);([^,]+),(.+)$/.test(s)
try {
Joi.assert(s, Joi.string().dataUri())
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shields-ci
Copy link

shields-ci commented May 30, 2019

Warnings
⚠️

Found 'assert' statement added in lib/logos.js.
Please ensure tests are written using Chai expect syntax

Messages
📖 ✨ Thanks for your contribution to Shields, @chris48s!
📖

Thanks for contributing to our documentation. We ❤️ our documentarians!

Generated by 🚫 dangerJS against 43b75e0

@paulmelnikow
Copy link
Member

Cheers, thanks for picking this up!

@chris48s chris48s merged commit 98f380b into badges:master May 30, 2019
@shields-deployment
Copy link

This pull request was merged to master branch. This change is now waiting for deployment, which will usually happen within a few days. Stay tuned by joining our #ops channel on Discord!

After deployment, changes are copied to gh-pages branch:

@platan
Copy link
Member

platan commented May 30, 2019

@chris48s thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
npm-package Badge generation and badge templates security Refer to our SECURITY.md policy before opening pull requests that address a security vulnerability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants