You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2018/11/21 13:47:45 UTC

[myfaces-tobago] branch tobago-3.x updated: TOBAGO-1958: CommandRenderer may not escape links correctly

This is an automated email from the ASF dual-hosted git repository.

lofwyr pushed a commit to branch tobago-3.x
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git


The following commit(s) were added to refs/heads/tobago-3.x by this push:
     new 561f804  TOBAGO-1958: CommandRenderer may not escape links correctly
561f804 is described below

commit 561f8042187dc7465017bcbb95f006df8ebfc8d6
Author: Udo Schnurpfeil <lo...@apache.org>
AuthorDate: Wed Nov 21 14:27:18 2018 +0100

    TOBAGO-1958: CommandRenderer may not escape links correctly
    
    (cherry picked from commit 263a291828797cd0867a5225072fdc18980fb1f5)
---
 .../tobago/internal/renderkit/renderer/CommandRendererBase.java       | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/CommandRendererBase.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/CommandRendererBase.java
index 5a2e8fe..8736492 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/CommandRendererBase.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/CommandRendererBase.java
@@ -88,8 +88,8 @@ public abstract class CommandRendererBase extends DecodingCommandRendererBase {
     if (!disabled) {
       if (link) {
         final String href = RenderUtils.generateUrl(facesContext, command);
-        writer.writeAttribute(HtmlAttributes.HREF, href, false);
-        writer.writeAttribute(HtmlAttributes.TARGET, target, false);
+        writer.writeAttribute(HtmlAttributes.HREF, href, true);
+        writer.writeAttribute(HtmlAttributes.TARGET, target, true);
 
         command.setOmit(true);
       }