mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Heinous merge from HEAD. Seems to basically work. Be on guard however.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@4137 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -145,12 +145,31 @@ public final class FacesHelper
|
||||
else
|
||||
{
|
||||
// make sure we do not have illegal characters in the id
|
||||
id = makeLegalId(id);
|
||||
}
|
||||
|
||||
component.setId(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes the given id a legal JSF component id by replacing illegal
|
||||
* characters with underscores.
|
||||
*
|
||||
* @param id The id to make legal
|
||||
* @return The legalised id
|
||||
*/
|
||||
public static String makeLegalId(String id)
|
||||
{
|
||||
if (id != null)
|
||||
{
|
||||
// replace illegal ID characters with an underscore
|
||||
id = id.replace(':', '_');
|
||||
id = id.replace(' ', '_');
|
||||
|
||||
// TODO: check all other illegal characters - only allowed dash and underscore
|
||||
}
|
||||
|
||||
component.setId(id);
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user