Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[String] Slugger should only replace special characters for the English locale #36383

Copy link
Copy link
Closed
@javiereguiluz

Description

@javiereguiluz
Issue body actions

Symfony version(s) affected: 5.0+

Description
The Slugger provided by String replaces & by and and @ by at. This is only correct for English, but it looks like it's doing it unconditionally. See

->replace('@', $separator.'at'.$separator)
->replace('&', $separator.'and'.$separator)

Possible solution
Do this replacement only for English. If it's not possible to detect the locale, then it's preferable to not do the replacement.

Additional context
This was originally reported in this comment of the Symfony blog.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.