@@ -29,8 +29,8 @@ public override async Task<int> ExecuteAsync(CommandContext context, ConsoleSett
2929 var connString = GetConnectionString ( settings ) ;
3030
3131 //Logger.LogInformation("");
32- AnsiConsole . MarkupLine ( $ "ConnectionString: [teal]{ connString } [/]") ;
33- AnsiConsole . MarkupLine ( $ "SQL Query : [teal]{ settings . SQLCommand } [/]") ;
32+ AnsiConsole . MarkupLine ( $ "ConnectionString: [teal]{ connString . EscapeMarkup ( ) } [/]") ;
33+ AnsiConsole . MarkupLine ( $ "SQL Query : [teal]{ settings . SQLCommand . EscapeMarkup ( ) } [/]") ;
3434
3535 bool running = true ;
3636
@@ -45,7 +45,7 @@ public override async Task<int> ExecuteAsync(CommandContext context, ConsoleSett
4545 . Start ( "Please wait..." , ctx =>
4646 {
4747 // Simulate some work
48- ctx . Status ( $ "Trying to connect to server [teal]{ settings . Server } [/]...") ;
48+ ctx . Status ( $ "Trying to connect to server [teal]{ settings . Server . EscapeMarkup ( ) } [/]...") ;
4949 CallDatabase ( connString , settings ) ;
5050
5151 // Update the status and spinner
@@ -100,7 +100,7 @@ private static string GetConnectionString(ConsoleSettings settings) {
100100
101101 private void CallDatabase ( string connString , ConsoleSettings settings )
102102 {
103- AnsiConsole . MarkupLine ( $ "[teal]{ DateTime . Now . ToLocalTime ( ) } [/] Connecting to { settings . Server } ... ") ;
103+ AnsiConsole . MarkupLine ( $ "[teal]{ DateTime . Now . ToLocalTime ( ) } [/] Connecting to { settings . Server . EscapeMarkup ( ) } ... ") ;
104104
105105 try
106106 {
@@ -122,7 +122,7 @@ private void CallDatabase(string connString, ConsoleSettings settings)
122122 }
123123 }
124124 }
125- AnsiConsole . MarkupLine ( $ " [green]SUCCESS[/] { sb } ") ;
125+ AnsiConsole . MarkupLine ( $ " [green]SUCCESS[/] { sb . ToString ( ) . EscapeMarkup ( ) } ") ;
126126 }
127127 }
128128 catch ( SqlException ex )
0 commit comments