Bug 246776 WebLibs with spaces fail
diff --git a/features/org.eclipse.wst.common_core.feature.patch/buildnotes_org.eclipse.wst.common_core.feature.patch.html b/features/org.eclipse.wst.common_core.feature.patch/buildnotes_org.eclipse.wst.common_core.feature.patch.html
index e41fb41..c1c0b85 100644
--- a/features/org.eclipse.wst.common_core.feature.patch/buildnotes_org.eclipse.wst.common_core.feature.patch.html
+++ b/features/org.eclipse.wst.common_core.feature.patch/buildnotes_org.eclipse.wst.common_core.feature.patch.html
@@ -23,4 +23,5 @@
 <p>Bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=239309">239309</a>. Deadlock</p>
 <p>Bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=246872">246872</a>. Duplicated warnings from validation</p>
 <p>Bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=237092">237092</a>. ModuleCoreValidator deadlock</p>
+<p>Bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=246776">246776</a>. WebLibs with spaces fail</p>
 </body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.wst.common_core.feature.patch/feature.properties b/features/org.eclipse.wst.common_core.feature.patch/feature.properties
index 8be2163..e5aaee9 100644
--- a/features/org.eclipse.wst.common_core.feature.patch/feature.properties
+++ b/features/org.eclipse.wst.common_core.feature.patch/feature.properties
@@ -40,6 +40,7 @@
 Bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=239309 Deadlock\n\
 Bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=246872 Duplicated warnings from validation\n\
 Bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=237092 ModuleCoreValidator deadlock\n\
+Bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=246776 WebLibs with spaces fail\n\
 \n\
 
 # "copyright" property - text of the "Feature Update Copyright"
diff --git a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/ComponentUtilities.java b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/ComponentUtilities.java
index c637461..5d4e167 100644
--- a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/ComponentUtilities.java
+++ b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/ComponentUtilities.java
@@ -12,7 +12,9 @@
 
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 import org.eclipse.core.resources.IContainer;
 import org.eclipse.core.resources.IFile;
@@ -215,6 +217,18 @@
 		modHandlesList.addAll(targetComponentProjects);
 		model.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENT_LIST, modHandlesList);
 		model.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENTS_DEPLOY_PATH,"/WEB-INF/lib"); //$NON-NLS-1$
+		if(modHandlesList != null){
+			Map map = new HashMap();
+			for(int i=0; i<modHandlesList.size();i++){
+				IVirtualComponent comp = (IVirtualComponent)modHandlesList.get(i);
+				String uri = comp.getName().replace(' ', '_') + ".jar";
+				map.put(comp, uri);
+			}
+			if(map.size() > 0){
+				model.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENTS_TO_URI_MAP, map);
+			}
+		}
+		
 		return new CreateReferenceComponentsOp(model);
 	}