escape scripts and also expire for badge