i have made a draft PR for nip-01 that elaborates every bit of the details of how to do escaping correctly, i'm sure i went too far with detail but maybe it is ok