Castle.MonoRail.Framework.Helpers.AbstractHelper.JavaScriptEscape C# (CSharp) Method

JavaScriptEscape() public method

Escapes JavaScript with Url encoding and returns the encoded string.
Converts quotes, single quotes and CR/LFs to their representation as an escape character.
public JavaScriptEscape ( string content ) : string
content string The text to URL encode and escape JavaScript within.
return string
		public string JavaScriptEscape(string content)
		{
			if (string.IsNullOrEmpty(content)) return content;

			return controller.Context.Server.JavaScriptEscape(content);
		}