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

[Mime][BCBreak] Change of expected behaviour in address quoting since #39866 #41264

Copy link
Copy link
Closed
@althaus

Description

@althaus
Issue body actions

Symfony version(s) affected: 4.4.23

Description

In PR #39866 a bugfix was introduced to add quoting of sender names to the Address::toString method. This breaks our current code which expects unquoted names. I understand why the change was applied, but I don't think that it should change the current behaviour of the toString method. We also rely on this for proper displaying where quotes aren't needed.

We now have doubled quoting in our test cases. In addition the fix quotes spaces which is not necessary at all.

How to reproduce

  1. Create a new address new Address('test@example.org', 'Test, Test')
  2. Have custom code that quotes the name if it contains special characters (see RFC 5322)
  3. The final string representation now contains doubled quotes: "\"Test, Test\" <test@example.org>"

Possible Solution

Introduce a new toQuotedString method or something similar.

Kind regards
Matthias

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No 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.