Skip to content

Commit

Permalink
Fixed a bug where a Command that returns text returned "<" or ">" the…
Browse files Browse the repository at this point in the history
… console will think its HTML.
  • Loading branch information
dkarzon committed Dec 21, 2011
1 parent 28b31a2 commit 6d8d469
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion NetBash/UI/NetBashHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,16 @@ private static string RenderCommand(HttpContext context)
try
{
var result = NetBash.Current.Process(context.Request.Params["Command"]);
commandResponse = result.Result;
if (result.IsHtml)
{
//on your way
commandResponse = result.Result;
}
else
{
//encode it
commandResponse = context.Server.HtmlEncode(result.Result);
}
isHtml = result.IsHtml;
}
catch (Exception ex)
Expand Down

0 comments on commit 6d8d469

Please sign in to comment.