microsoft / microsoft-ui-xaml

Windows UI Library: the latest Windows 10 native controls and Fluent styles for your applications
MIT License
6.21k stars 669 forks source link

Can't use escaped quote inside quoted markup extension property #2904

Open evelynwu-msft opened 4 years ago

evelynwu-msft commented 4 years ago

Describe the bug

Steps to reproduce the bug C# snippet (assumes app project is called "App3", and a custom markup extension named "MyExtension"):

XamlReader.Load(
@"
    <Grid
        xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation""
        xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml""
        xmlns:local=""using:App3"">
        <TextBlock Text=""{local:MyExtension Text='\'hello'}"" />
    </Grid>
");

Expected behavior Just works.

Actual behavior "Unexpected quotation mark" error is raised.

Version Info All versions (WPF, too!)

MikeHillberg commented 3 years ago

We need to ensure the fix for this doesn't cause a regression, see the discussion in this comment:
https://github.com/microsoft/microsoft-ui-xaml-specs/pull/91/commits/c0339629656d34f270efea5b3c63b97939dbe172#r461760606

evelynwu-msft commented 1 year ago

https://task.ms/27463393