diff --git a/openquake/commonlib/source.py b/openquake/commonlib/source.py
index <HASH>..<HASH> 100644
--- a/openquake/commonlib/source.py
+++ b/openquake/commonlib/source.py
@@ -965,7 +965,7 @@ def collect_source_model_paths(smlt):
         with node.context(smlt, blevel):
             for bset in blevel:
                 for br in bset:
-                    smfname = br.uncertaintyModel.text.strip()
+                    smfname = ' '.join(br.uncertaintyModel.text.split())
                     if smfname:
                         yield smfname
Normalized uncertaintyModel in collect_source_model_paths [skip hazardlib]