Skip to content

Properties that have ToString() called on them do not escape XML #128

@jeremy-morren

Description

@jeremy-morren

If a property is formatted via ToString(), XML characters are not escaped

var logger = new LoggerConfiguration()
    .WriteTo.RichTextBox(LogTextBox)
    .CreateLogger();

// Succeeds
logger.Information("URL {Url}", "http://localhost?1&2");

// XAML parse exception
logger.Information("URL {Url}", new Uri("http://localhost?1&2"));

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