alphagov/whitehall — pull request #1520 by tekin (2014-06-02 13:55:05+00:00)
Title: Handle html attachment preview on non existent docs

Some housekeeping to stop exceptions being raised when previewing HTML attachments on non-existent documents (https://errbit.production.alphagov.co.uk/apps/53020d6c0da11585f10000e7/problems/5386d40a0da11537fa000448). Also adds some extra checking to prevent the preview of HTML attachments on access-limited documents.