Simplified link content handling in gallery, echo statements