Skip to content

Cypress interprets underscores in URL as formatting instructions on frontend #28100

@josh-atkins

Description

@josh-atkins

Current behavior

When I visit a page in a Cypress test that includes underscores, such as "http://localhost:3000/__testing__/", the Cypress frontend interprets the underscores as formatting instructions (i.e. as markdown). This causes the frontend to report the URL as "http://localhost/testing/", with "testing" displayed in bold.

This is problematic because it provides a distraction when debugging e.g. it suggests that Cypress is following a different route than what is provided in the test.

image image

Desired behavior

The Cypress frontend should interpret the URL literally and not interpret any formatting instructions from the original string.

Test code to reproduce

A simple test should demonstrate the error when viewed in the Cypress frontend.

describe('the http://localhost:3000 website', () => {

    it('should visit /__testing__/', () => {

        cy.visit("http://localhost:3000/__testing__/");

    })

});

Cypress Version

13.3.1

Node version

20.5.1

Operating System

macOS 13.3.1

Debug Logs

No response

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomerspkg/reporterThis is due to an issue in the packages/reporter directorytype: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions