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

Exception if url contains percent symbol #1287

Closed
xarety opened this issue Apr 9, 2021 · 5 comments · Fixed by #1288
Closed

Exception if url contains percent symbol #1287

xarety opened this issue Apr 9, 2021 · 5 comments · Fixed by #1288

Comments

@xarety
Copy link

xarety commented Apr 9, 2021

  • Operating System: macOS 11.2.3
  • Node Version: 14.15.2
  • NPM Version: 6.14.9
  • webpack Version: 4.46.0
  • css-loader Version: 5.2.0

Seems like this changeset brokes this line.

Expected Behavior

Webpack bundling finish successfully.

Actual Behavior

ERROR in ./src/index.css
Module build failed (from ./node_modules/css-loader/dist/cjs.js):
URIError: URI malformed
    at /Users/xarety/servicetitan/url-bug-reproduction/src/index.css:2:5
    at decodeURI (<anonymous>)
    at normalizeUrl (/Users/xarety/servicetitan/url-bug-reproduction/node_modules/css-loader/dist/utils.js:114:10)
    at /Users/xarety/servicetitan/url-bug-reproduction/node_modules/css-loader/dist/plugins/postcss-url-parser.js:119:37
    at walk (/Users/xarety/servicetitan/url-bug-reproduction/node_modules/postcss-value-parser/lib/walk.js:7:16)
    at ValueParser.walk (/Users/xarety/servicetitan/url-bug-reproduction/node_modules/postcss-value-parser/lib/index.js:18:3)
    at parseDeclaration (/Users/xarety/servicetitan/url-bug-reproduction/node_modules/css-loader/dist/plugins/postcss-url-parser.js:97:10)
    at Declaration (/Users/xarety/servicetitan/url-bug-reproduction/node_modules/css-loader/dist/plugins/postcss-url-parser.js:248:29)
    at LazyResult.visitTick (/Users/xarety/servicetitan/url-bug-reproduction/node_modules/postcss/lib/lazy-result.js:456:16)
    at LazyResult.runAsync (/Users/xarety/servicetitan/url-bug-reproduction/node_modules/postcss/lib/lazy-result.js:372:30)
    at LazyResult.async (/Users/xarety/servicetitan/url-bug-reproduction/node_modules/postcss/lib/lazy-result.js:205:30)
    at LazyResult.then (/Users/xarety/servicetitan/url-bug-reproduction/node_modules/postcss/lib/lazy-result.js:190:17)
 @ ./src/index.js 1:0-22

Code

https://github.com/xarety/url-bug-reproduction

How Do We Reproduce?

  1. clone repository
  2. npm i
  3. npm run build
@xarety xarety changed the title Unexpected exception if url contains percent symbol Exception if url contains percent symbol Apr 9, 2021
@alexander-akait
Copy link
Member

hm, svg should be encoded here, I can add try/catch

@xarety
Copy link
Author

xarety commented Apr 9, 2021

Otherwise, it should have a meaningful error message at least. 🙂

@alexander-akait
Copy link
Member

Anyway we should ignore this,I will fix it

@xarety
Copy link
Author

xarety commented Apr 9, 2021

Thank you!

@alexander-akait
Copy link
Member

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 a pull request may close this issue.

2 participants