You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ta...@apache.org on 2021/03/02 10:17:07 UTC
[myfaces] branch 3.0.x updated: MYFACES-4381 Invalid ID is created
when facet contains invalid (id) chars
This is an automated email from the ASF dual-hosted git repository.
tandraschko pushed a commit to branch 3.0.x
in repository https://gitbox.apache.org/repos/asf/myfaces.git
The following commit(s) were added to refs/heads/3.0.x by this push:
new d0a49e1 MYFACES-4381 Invalid ID is created when facet contains invalid (id) chars
d0a49e1 is described below
commit d0a49e1210552869a530735a57d1b81aec42db1b
Author: Thomas Andraschko <ta...@apache.org>
AuthorDate: Tue Mar 2 11:16:59 2021 +0100
MYFACES-4381 Invalid ID is created when facet contains invalid (id) chars
---
.../myfaces/view/facelets/tag/jsf/ComponentSupport.java | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ComponentSupport.java b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ComponentSupport.java
index 0b31fdc..7ab6ec6 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ComponentSupport.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ComponentSupport.java
@@ -598,14 +598,9 @@ public final class ComponentSupport
}
if (uniqueIdVendor != null)
{
- // UIViewRoot implements UniqueIdVendor, so there is no need to cast to UIViewRoot
- // and call createUniqueId(). See ComponentTagHandlerDelegate
- int index = facetName.indexOf('.');
- String cleanFacetName = facetName;
- if (index >= 0)
- {
- cleanFacetName = facetName.replace('.', '_');
- }
+ String cleanFacetName = facetName.replace('.', '_')
+ .replace('{', '_')
+ .replace('}', '_');
panel.setId(uniqueIdVendor.createUniqueId(facesContext,
mctx.getSharedStringBuilder()
.append(parent.getId())