allow several refs on same line & fix HTML scanning