Improved file indexing

belongs to already merged commit
https://gerrit.wikimedia.org/r/#/c/148972/
Fixed issue in external build index

Change-Id: I3318b16e5fd32fd171ebbcea5520ea85d6cbaee2
Readded escaping of highlight snippets

Snippets somehow could contain html

Change-Id: Ibb5a19ef33b824ab1d148323cb821762ef9ed9bd
Merge "Improved file indexing"
Merge "Readded escaping of highlight snippets"