Calendar of Events: Direct linking now respects the source link target attribute and related code has been optimized.

Fixes #6402