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

Incorrect removal of quotes for url on inlined background image statements #110

Closed
ghost opened this issue Jun 4, 2013 · 5 comments
Closed
Assignees

Comments

@ghost
Copy link

ghost commented Jun 4, 2013

The following gets the quotes stripped out, and as a result, will no longer render in Chrome.

.icon-logo {
  background-image: url('data:image/svg+xml;charset=US-ASCII,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%3Csvg%20version%3D%221.1%22%20id%3D%22Layer_1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20x%3D%220px%22%20y%3D%220px%22%20%20width%3D%2294px%22%20height%3D%2282px%22%20viewBox%3D%220%200%2094%2082%22%20enable-background%3D%22new%200%200%2094%2082%22%20xml%3Aspace%3D%22preserve%22%3E%3Crect%20x%3D%2271%22%20y%3D%2218%22%20opacity%3D%220.7%22%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20fill%3D%22%23FFFFFF%22%20width%3D%2220%22%20height%3D%2257%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20fill%3D%22%232A4251%22%20d%3D%22M67.404%2C24.14c0-1.594-1.304-2.887-2.913-2.887H11.845%20c-1.61%2C0-2.915%2C1.293-2.915%2C2.887v43.494c0%2C1.593%2C1.305%2C2.887%2C2.915%2C2.887h52.646c1.609%2C0%2C2.913-1.294%2C2.913-2.887V24.14z%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20fill%3D%22%2340627C%22%20d%3D%22M88.172%2C79.182h-6.014l0.002%2C3.068l-8.928%2C0.001v-3.069H21.468%20v3.069l-9.81-0.001l0.001-3.068H5.83c-3.22%2C0-5.83-2.585-5.83-5.774V18.365c0-3.189%2C2.609-5.775%2C5.83-5.775h32.244%20c0%2C0%2C1.289-1.767%2C3.637-3.378L34.22%2C1.791l2.061-2.042l8.081%2C8.006c1.539-0.653%2C3.318-1.121%2C5.371-1.121%20c2.179%2C0%2C4.027%2C0.531%2C5.602%2C1.25l8.212-8.136l2.062%2C2.042l-7.669%2C7.599c2.134%2C1.561%2C3.27%2C3.201%2C3.27%2C3.201h26.963%20c3.22%2C0%2C5.828%2C2.585%2C5.828%2C5.775v55.042C94%2C76.597%2C91.392%2C79.182%2C88.172%2C79.182z%20M67.402%2C24.14c0-1.594-1.305-2.887-2.913-2.887%20H11.842c-1.61%2C0-2.915%2C1.293-2.915%2C2.887v43.494c0%2C1.594%2C1.305%2C2.887%2C2.915%2C2.887h52.647c1.608%2C0%2C2.913-1.293%2C2.913-2.887V24.14z%20%20M76.514%2C70.52h8.561v-2.887h-8.561V70.52z%20M76.514%2C64.746h8.561v-2.888h-8.561V64.746z%20M76.514%2C58.789h8.561v-2.887h-8.561V58.789z%20%20M76.514%2C53.014h8.561v-2.888h-8.561V53.014z%20M80.591%2C21.325c-2.415%2C0-4.372%2C1.939-4.372%2C4.331c0%2C2.392%2C1.957%2C4.331%2C4.372%2C4.331%20c2.414%2C0%2C4.373-1.939%2C4.373-4.331C84.964%2C23.264%2C83.005%2C21.325%2C80.591%2C21.325z%20M80.591%2C32.838c-2.415%2C0-4.372%2C1.939-4.372%2C4.331%20c0%2C2.392%2C1.957%2C4.332%2C4.372%2C4.332c2.414%2C0%2C4.373-1.939%2C4.373-4.332C84.964%2C34.777%2C83.005%2C32.838%2C80.591%2C32.838z%22%2F%3E%3Cg%20opacity%3D%220.9%22%3E%20%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M15.988%2C29.587h11.961v3.767h-7.462v10.464h6.618v3.767h-6.618v11.277h7.462v3.767H15.988V29.587z%22%2F%3E%20%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M29.419%2C29.587h14.643v3.895h-5.04v29.146H34.61V33.482h-5.191V29.587z%22%2F%3E%20%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M45.879%2C29.587h4.434l2.012%2C12.197l0.346%2C2.205l0.713%2C4.793c0.116%2C0.813%2C0.22%2C1.556%2C0.313%2C2.226%20%20c0.094%2C0.671%2C0.177%2C1.277%2C0.249%2C1.819l0.216%2C1.626c0.043-0.328%2C0.08-0.62%2C0.109-0.877c0.027-0.257%2C0.057-0.471%2C0.086-0.643%20%20l0.584-3.83l0.758-5.029c0.07-0.456%2C0.141-0.877%2C0.205-1.263c0.064-0.385%2C0.125-0.727%2C0.184-1.027l2.162-12.197h4.197%20%20l-6.555%2C33.041h-3.568L45.879%2C29.587z%22%2F%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3C%2Fsvg%3E');

  background-repeat: no-repeat;
}
@ghost ghost assigned GoalSmashers Jun 4, 2013
@GoalSmashers
Copy link
Contributor

@dariusriggins not only Chrome but other browsers as well! Fix is coming!

@GoalSmashers
Copy link
Contributor

@dariusriggins clean-css 1.0.6 is out in npm repo. Thanks for reporting!

@ghost
Copy link
Author

ghost commented Jun 4, 2013

Awesome turn around, thanks!

@niln1
Copy link

niln1 commented Jun 11, 2015

Same issue raise with "clean-css": "^3.1.0"

@jakubpawlowicz
Copy link
Collaborator

@nilveryawesome I definitely don't see it with latest 3.1, 3.2, and 3.3 branches. Can you share your use case?

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

No branches or pull requests

3 participants