Replace legacy mark_special_links javascript with corresponding pattern from mockup (#286).