private string FormatItemName(string itemName) { UbbParser ubbParser = new UbbParser(); ubbParser.AddTagHandler(new IMG()); return(ubbParser.UbbToHtml(itemName)); }
/// <summary> /// 自定义要解析的标签 /// </summary> /// <param name="text"></param> /// <param name="tags"></param> /// <returns></returns> public static string ConvertUbbToHtml(string text, string[] tags) { List <UbbTagHandler> handlers = CreateHandlers(tags); UbbParser parser = new UbbParser(handlers); return(parser.UbbToHtml(text)); }