public static string FormatCompleteUrl(string content)
{
var srcPatternFormat = "src=[\"']\\s*(/[^\"']*)\\s*[\"']";
var hrefPatternFormat = "href=[\"']\\s*(/[^\"']*)\\s*[\"']";
var hostPath = HostPath(HttpContext.Current.Request.Url);
content = Regex.Replace(content, srcPatternFormat, "src=\"" + hostPath + "$1\"",
RegexOptions.IgnoreCase | RegexOptions.Compiled);
content = Regex.Replace(content, hrefPatternFormat, "href=\"" + hostPath + "$1\"",
RegexOptions.IgnoreCase | RegexOptions.Compiled);
return content;
}