Is there a reputable library for this? I have read that replacing dangerous characters with regex is not enough.