This week's TBB is Enforce Anchor Target TBB . The functionality is to enforce a 'system-wide' anchor target policy. Namely, any fully qualified URLs should open in a new ( _blank ) target browser window. All other (relative) URLs should open in the same target. More specifically, if there is a target specified for a relative URL, remove it. Name Enforce Anchor Target TBB Type · Template in .NET Assembly Description Used to: · Enforces a certain “ target ” attribute for the anchor tags depending on their “ href ” attribute value; Notes: This generic TBB expects an Item called “Output” in the Package. It parses the Output looking for anchor <a> tags. If the anchor’s “ href ” attribute is a fully qualified URL (starts with “ http:// ” or “ https:// ”), then it adds/replaces “ target ” attribute with value “ _blank ”. Otherwise, it removes the “ target ” attribute, if...
talk is cheap. show me the code.