Refactor #10126 Rewrite Export Static HTML function
http://tracker.modx.com/issues/10126