Fixed response system to not decorate html responses if requested by AJAX.
Merge branch '1.8.x'