Port of patch to filter JS comments.