if (tag.IndexOf("'") >-1)
{
tag= tag.Replace("'", "''");
}
if (tag.IndexOf("‘")>-1)
{
tag = tag.Replace("‘", "''");
}
通過判斷裏面是否有單引號後,然後將其替換成雙引號