BlogEngine.Core.Web.Scripting.Helpers.FormatInlineScript C# (CSharp) Method

FormatInlineScript() public static method

Format inline script
public static FormatInlineScript ( string script ) : string
script string JavaScript code
return string
        public static string FormatInlineScript(string script)
        {
            var sb = new StringBuilder();

            sb.Append("\n<script type=\"text/javascript\"> \n");
            sb.Append("//<![CDATA[ \n");
            sb.Append(script).Append(" \n");
            sb.Append("//]]> \n");
            sb.Append("</script> \n");

            return sb.ToString();
        }