If there's no gas leaking out when the cap is on then it's an acceptable temporary fix.
If you have a spare regulator, fitting that would be a better temporary fix as the valve on the regulator will shut and prevent leakage.
For safety, keep checking it to ensure it's not leaking.
Make sure the area is well ventilated too (better if it's outside).
It may be worth refitting the regulator and taking it off again, a few times, to see if the valve on the bottle starts working again.
Hope this helps