Save spark messages if the output is redirect.
Don't even turn off magic quotes runtime anymore

PHP 5.3.0 and up complains a lot even if you're just trying to turn
off magic quotes.
Fix an issue with routing parameter values.
Only templatize the main section automatically.