What brand of heater and extension cord do you have?
Why do I ask? Because the one I had today, the part where I plugged the heat into melted! Got so hot after awhile the heater plug melted the extension cord end (leaving a nasty and smelling look). So now I need to get a replacement.
You should probably know that you cannot run heaters like that for a longtime. The reason it melted is because it got too warm. The wattage of space heaters is massive. It's a bad fire hazzard to keep it on, but if you want to play it safer than your old wire then just get a thicker cord and it "should" be fine.
If you leave it on overnight be sure to write your will(just in case)
I think it is best just to use the cord on the space heater if it is long enough to reach the power outlet, and not use a power strip or cord since they may not be good enough to handle the power needed for the heater.
The sales person at a hardware store may know the best extension cord for you.
Maybe you turned the heat on too high which uses too much power. I also heard if the cord's plastic is stripped or the cord is very bent, it can cause a fire.