Skip to content

fix: restore proper class name escaping#36258

Merged
dgozman merged 1 commit into
microsoft:mainfrom
dgozman:fix-css-escape-class-name
Jun 10, 2025
Merged

fix: restore proper class name escaping#36258
dgozman merged 1 commit into
microsoft:mainfrom
dgozman:fix-css-escape-class-name

Conversation

@dgozman

@dgozman dgozman commented Jun 10, 2025

Copy link
Copy Markdown
Collaborator

For class names we need full CSS.escape because there are not quotes and it is a CSS identifier. This is in contrast to an attribute like [name="foo"] where quotes makes it a CSS string that needs less escaping.

Regressed in #36081.

Fixes microsoft/playwright-mcp#537.

@dgozman
dgozman requested a review from mxschmitt June 10, 2025 10:33
@github-actions

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

4 flaky ⚠️ [firefox-library] › library/inspector/cli-codegen-1.spec.ts:986:7 › cli codegen › should not throw csp directive violation errors @firefox-ubuntu-22.04-node18
⚠️ [webkit-library] › library/trace-viewer.spec.ts:1169:1 › should update highlight when typing locator @webkit-ubuntu-22.04-node18
⚠️ [webkit-page] › page/page-screenshot.spec.ts:345:5 › page screenshot › should work while navigating @webkit-ubuntu-22.04-node18
⚠️ [playwright-test] › ui-mode-test-watch.spec.ts:145:5 › should watch all @windows-latest-node18-1

39354 passed, 820 skipped
✔️✔️✔️

Merge workflow run.

@dgozman
dgozman merged commit 92994a8 into microsoft:main Jun 10, 2025
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.

Error with CSS selector

2 participants