An alternative to UBB.threads
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
FLocal/FLocal.Common/BBCodes/AbstractLocalLink.cs

30 lines
655 B

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PJonDevelopment.BBCode;
using FLocal.Common.URL;
namespace FLocal.Common.BBCodes {
abstract class AbstractLocalLink : BBCode {
protected AbstractLocalLink(string name)
: base(name) {
}
abstract protected AbstractUrl url {
get;
}
public override string Format(ITextFormatter formatter) {
var url = this.url;
var name = this.Safe(url.title);
if(this.Default != null) {
name = this.GetInnerHTML(formatter);
}
return string.Format("<a href=\"{0}\">{1}</a>", url.canonical, url.title);
}
}
}