Author: krispopat
Date: Tue Dec 7 10:13:04 2010
New Revision: 1042957
URL: http://svn.apache.org/viewvc?rev=1042957&view=rev
Log:
This adds a regex to the function convertIdToFolderName to catch potential bad
filename characters when wookie creates the widget instance folder
Modified:
incubator/wookie/trunk/parser/java/src/org/apache/wookie/w3c/util/WidgetPackageUtils.java
Modified:
incubator/wookie/trunk/parser/java/src/org/apache/wookie/w3c/util/WidgetPackageUtils.java
URL:
http://svn.apache.org/viewvc/incubator/wookie/trunk/parser/java/src/org/apache/wookie/w3c/util/WidgetPackageUtils.java?rev=1042957&r1=1042956&r2=1042957&view=diff
==============================================================================
---
incubator/wookie/trunk/parser/java/src/org/apache/wookie/w3c/util/WidgetPackageUtils.java
(original)
+++
incubator/wookie/trunk/parser/java/src/org/apache/wookie/w3c/util/WidgetPackageUtils.java
Tue Dec 7 10:13:04 2010
@@ -36,6 +36,7 @@ import org.apache.wookie.w3c.IW3CXMLConf
*/
public class WidgetPackageUtils {
static Logger _logger =
Logger.getLogger(WidgetPackageUtils.class.getName());
+
/**
* Implements the rule for finding a file within a widget; it returns
the first localized version
@@ -157,7 +158,8 @@ public class WidgetPackageUtils {
if(id.startsWith("http://")){ //$NON-NLS-1$
id = id.substring(7, id.length());
}
- id = id.replaceAll(" ", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ //id = id.replaceAll(" ", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ id = id.replaceAll("[ \\/:\"*?<>|`\n\r\t\0]+", "");
return id;
}