public static TagA AbsoluteHref(this TagA tag) { var href = tag.Attribute("href").GetOrDefault(x => x.Value); tag.SetAttributeValue("href", CommonConst.SiteRoot + href); return(tag); }
public static string GetHref(this TagA tag) { var attr = tag.Attribute("href"); if (attr == null) { return(string.Empty); } return(attr.Value); }