Preparation of a novel lignin-based flame retardant for epoxy resin