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

Fix false-positive when the <!Entity> tag contains markup #24

Merged

Conversation

eluisfonseca
Copy link
Contributor

@eluisfonseca eluisfonseca commented Jan 3, 2020

Fixes #23
Fixes isSvg returning false for valid svg, whenever they included markup inside an tag
It now searches for <!Entity> tags and clears them of markup, before applying the usual regex.
Also added an svg with an appropriate example to the valid svg tests.

index.js Show resolved Hide resolved
test.js Outdated Show resolved Hide resolved
@sindresorhus
Copy link
Owner

The PR title should say what it fixes more clearly. And you should use Fixes #23 GitHub syntax so the issue is closed when the PR is merged.

I would recommend reading https://github.com/tiimgreen/github-cheat-sheet#readme

@eluisfonseca eluisfonseca changed the title Fixes isSvg returning false for valid svg Fixes #23: isSvg returning false for valid svg whenever they included markup inside an <!Entity> tag Jan 3, 2020
index.js Outdated Show resolved Hide resolved
test.js Outdated Show resolved Hide resolved
@sindresorhus sindresorhus changed the title Fixes #23: isSvg returning false for valid svg whenever they included markup inside an <!Entity> tag Fix false-positive when the <!Entity> tag contains markup Jan 12, 2020
@sindresorhus sindresorhus merged commit f8e39a8 into sindresorhus:master Jan 17, 2020
@sindresorhus
Copy link
Owner

This looks great now. Thanks for all your hard work on this PR 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Detection fails on svg but don't know why
2 participants