diff --git a/docs/input/best-practices.md b/docs/input/best-practices.md index 7d7c13c..20dc867 100644 --- a/docs/input/best-practices.md +++ b/docs/input/best-practices.md @@ -60,7 +60,7 @@ Spectre.Console will tell your terminal to use the color that is configured in t If you are using an 8 or 24-bit color for the foreground text, it is recommended that you also set an appropriate background color to match. -**Do** escape data when outputting any user input or any external data via Markup using the [`EscapeMarkup`](xref:M:Spectre.Console.Markup.Escape(System.String)) method on the data. Any user input containing `[` or `]` will likely cause a runtime error while rendering otherwise. +**Do** escape data when outputting any user input or any external data via Markup using the [`Markup.Escape`](xref:M:Spectre.Console.Markup.Escape(System.String)) method on the data. Any user input containing `[` or `]` will likely cause a runtime error while rendering otherwise. **Consider** replacing `Markup` and `MarkupLine` with [`MarkupInterpolated`](xref:M:Spectre.Console.AnsiConsole.MarkupInterpolated(System.FormattableString)) and [`MarkupLineInterpolated`](xref:M:Spectre.Console.AnsiConsole.MarkupLineInterpolated(System.FormattableString)). Both these methods will automatically escape all data in the interpolated string holes. When working with widgets such as the Table and Tree, consider using [`Markup.FromInterpolated`](xref:M:Spectre.Console.Markup.FromInterpolated(System.FormattableString,Spectre.Console.Style)) to generate an `IRenderable` from an interpolated string. @@ -119,4 +119,4 @@ For cmd.exe, the following steps are required to enable Unicode and Emoji suppor 5. Reboot. You will also need to ensure that your Console application is configured to use a font that supports Unicode and Emoji, -such as Cascadia Code. \ No newline at end of file +such as Cascadia Code.