📄 postprocessor.cs
字号:
using System;
using System.Collections;
using System.Text;
using System.Text.RegularExpressions;
using FreeTextBoxControls;
namespace FreeTextBoxControls.Common
{
/// <summary>
/// Handles HTML processing
/// </summary>
public class PostProcessor
{
/// <summary>
/// Removes the local servername from A and IMG tags
/// </summary>
public string RemoveServerNameFromUrls(string input, string servername)
{
System.Web.HttpContext.Current.Trace.Write("ServerName",servername);
input = Regex.Replace(input,"HREF=http://" + servername,"HREF=",RegexOptions.IgnoreCase);
input = Regex.Replace(input,"HREF=\"http://" + servername,"HREF=\"",RegexOptions.IgnoreCase);
input = Regex.Replace(input,"src=http://" + servername,"src=",RegexOptions.IgnoreCase);
input = Regex.Replace(input,"src=\"http://" + servername,"src=\"",RegexOptions.IgnoreCase);
return input;
}
/// <summary>
/// Removes the scriptname from bookmarks (#mark).
/// </summary>
public string RemoveScriptNameFromBookmarks(string input, string serverName, string url, string qString)
{
System.Web.HttpContext.Current.Trace.Write("Bookmark",serverName + url + "?" + qString);
input = input.Replace("href=\"http://" + serverName + url + "?" + qString,"href=\"");
input = input.Replace("href=http://" + serverName + url + "?" + qString,"href=");
return input;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -