make database healthcheck cross database

fix fo #1258
Escape line-feeds too in escapeXMLEntities otherwise breaks when title contains a \n (bug #1229)