Fixes text search for "secured" documents (take 2)

... using CSS visibility attributes. Fixes #2663.

@vyv03354, can you review?