using System; using System.Collections.Generic; using System.Linq; using System.Text; using PJonDevelopment.BBCode; namespace FLocal.Common.BBCodes { class Image : BBCode { public Image() : base("image") { } public override string Format(IPostParsingContext context, ITextFormatter formatter) { var urlInfo = UrlProcessor.Process(this.InnerText); if (urlInfo.isLocal && urlInfo.relativeUrl.StartsWith("/user/upload/")) { return "" + urlInfo.relativeUrl + "" + urlInfo.relativeUrl + ""; } else { return "" + urlInfo.relativeUrl + ""; } } } }