Dangers of spray foam in body panels?

don't spray foam. having replaced quarters and trunk extensions on my duster due to the previous owner thinking spray foam was a good idea. I can vouch that it does infact hold moisture and can reek havoc on the metal.

what i am planning on doing (and what others have mentioned) is completely finishing off my trunk. Im going to build a light weight wooden framing along each side of the trunk and I am then going to affix carpeted panels to the framing so that everything is clean looking and hidden. I will probably also build a hindged access panel at the back side ( the cavity behind the back seat) where I can keep my rear mounted battery to keep it hidden.aswell as any supplies (fuses,couple tools maybe...ect...ect...) just to keep it clean looking.