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:16:51 UTC
[myfaces] branch 2.3-next 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 2.3-next
in repository https://gitbox.apache.org/repos/asf/myfaces.git
The following commit(s) were added to refs/heads/2.3-next by this push:
new 6d3979f MYFACES-4381 Invalid ID is created when facet contains invalid (id) chars
6d3979f is described below
commit 6d3979fe9e583b93eca438632b31ba412b105311
Author: Thomas Andraschko <ta...@apache.org>
AuthorDate: Tue Mar 2 11:16:44 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 b49bd95..47f8ebc 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
@@ -510,14 +510,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())