Fix #43: Validate special characters in filename before rendering caption