Skip to content

[Bug]: select option with html encoded whitespace #40210

@gimler

Description

@gimler

Version

1.59.1

Steps to reproduce

look at the PR for test cases
#40207

actually it is not possible to select an option with a html encoded whitespace

<select>
  <option value="html">&nbsp;HTML</option>
</select>

Expected behavior

I expect to select an option with a &nbsp;.

Actual behavior

Playwright can not find the option

Additional context

No response

Environment

mcr.microsoft.com/playwright:v1.59.1-noble

  System:
    OS: Linux 6.8 Ubuntu 24.04.4 LTS 24.04.4 LTS (Noble Numbat)
    CPU: (16) x64 11th Gen Intel(R) Core(TM) i9-11950H @ 2.60GHz
    Memory: 41.80 GB / 62.50 GB
    Container: Yes
  Binaries:
    Node: 24.14.1 - /usr/bin/node
    Yarn: 1.22.22 - /usr/bin/yarn
    npm: 11.11.0 - /usr/bin/npm
  Languages:
    Bash: 5.2.21 - /usr/bin/bash

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions