Not the solution you are looking for, but I'd recommend you never use the Preview button. Not because of the error you are getting, but because no matter how good the preview is, it _will_ render differently in a "real" browser. Open quanta, open a browser and use both. Whereas you make a change in the code, refresh the browser...
Sorry for providing no more help...
Good luck though
