Skip to content

fix: parse semicolon and parenthesis inside quoted url#551

Merged
remarkablemark merged 2 commits into
masterfrom
fix/parser
Jul 3, 2026
Merged

fix: parse semicolon and parenthesis inside quoted url#551
remarkablemark merged 2 commits into
masterfrom
fix/parser

Conversation

@remarkablemark

@remarkablemark remarkablemark commented Jul 3, 2026

Copy link
Copy Markdown
Owner

What is the motivation for this pull request?

Bug fix: the parser fails when a quoted url() contains ) and ; inside the string, which is common in SVG data URLs.

Related to remarkablemark/style-to-object#112

What is the current behavior?

Fixes #550. inlineStyleParser throws property missing ':' when parsing a value like:

inlineStyleParser('background: url("a)b;c") no-repeat;');

This also affects real-world SVG data URLs that contain nested url(...) and semicolons in attributes like animateTransform values='...;...'.

What is the new behavior?

Quoted url() values are parsed as a single value, including any ) or ; inside the quotes.

Checklist:

@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (f861d7c) to head (bd7501a).

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #551   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines          103       103           
  Branches        20        20           
=========================================
  Hits           103       103           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mergify

mergify Bot commented Jul 3, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@remarkablemark remarkablemark self-assigned this Jul 3, 2026
@remarkablemark remarkablemark added the bug Something isn't working label Jul 3, 2026
@remarkablemark remarkablemark merged commit 1d9d45c into master Jul 3, 2026
13 checks passed
@remarkablemark remarkablemark deleted the fix/parser branch July 3, 2026 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error property missing ':' on quoted url() containing ) and ; (e.g. SVG data URLs)

1 participant