Tapestry
  1. Tapestry
  2. TAPESTRY-1604

Attributes of elements do not have entity values quoted (including the " character itself) resulting in invalid markup

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 5.0.5
    • Fix Version/s: 5.0.6
    • Component/s: None
    • Labels:
      None

      Description

      Simple example to demonstrate. The initial value of fullName in the bean has a couple of quotes in it. These are written directly to the HTML output instead of being turned into " entities.

      import org.apache.tapestry.annotations.Persist;

      public class Example {

      @Persist
      private MyBean myBean;

      public MyBean getMyBean()

      { return myBean; }

      public void setMyBean(MyBean myBean)

      { this.myBean = myBean; }

      }

      public class MyBean {
      private String fullName = "Fred \"Fredmeister\" Flintstone";

      public String getFullName()

      { return fullName; }

      public void setFullName(String fullName)

      { this.fullName = fullName; }

      }

      Example.html:

      <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
      <body>
      <t:beanEditForm object="myBean" />
      </body>
      </html>

        Activity

        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12568290 ] jira [ 12591356 ]
        Mark Thomas made changes -
        Workflow jira [ 12407090 ] Default workflow, editable Closed status [ 12568290 ]
        Howard M. Lewis Ship made changes -
        Fix Version/s 5.0.6 [ 12312544 ]
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Closed [ 6 ]
        Howard M. Lewis Ship made changes -
        Summary BeanEditForm outputs text values raw (no escaping of HTML characters) Attributes of elements do not have entity values quoted (including the &quot; character itself) resulting in invalid markup
        Howard M. Lewis Ship made changes -
        Assignee Howard M. Lewis Ship [ hlship ]
        David Peterson made changes -
        Field Original Value New Value
        Fix Version/s 5.0.5 [ 12312477 ]
        Affects Version/s 5.0.5 [ 12312477 ]
        Description Simple example to demonstrate. The initial value of fullName in the bean has a couple of quotes in it. These are written directly to the HTML output instead of being turned into &quot; entities.


        import org.apache.tapestry.annotations.Persist;

        public class Example {

            @Persist
            private MyBean myBean;

            public MyBean getMyBean() {
                return myBean;
            }

            public void setMyBean(MyBean myBean) {
                this.myBean = myBean;
            }
            
            public static class MyBean {
                private String fullName = "Fred \"Fredmeister\" Flintstone";

                public String getFullName() {
                    return fullName;
                }

                public void setFullName(String fullName) {
                    this.fullName = fullName;
                }
            }
        }


        Example.html:

        <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
        <body>
        <t:beanEditForm object="myBean" />
        </body>
        </html>

        Simple example to demonstrate. The initial value of fullName in the bean has a couple of quotes in it. These are written directly to the HTML output instead of being turned into &quot; entities.


        import org.apache.tapestry.annotations.Persist;

        public class Example {

            @Persist
            private MyBean myBean;

            public MyBean getMyBean() {
                return myBean;
            }

            public void setMyBean(MyBean myBean) {
                this.myBean = myBean;
            }
        }
            
        public class MyBean {
                private String fullName = "Fred \"Fredmeister\" Flintstone";

                public String getFullName() {
                    return fullName;
                }

                public void setFullName(String fullName) {
                    this.fullName = fullName;
                }
        }


        Example.html:

        <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
        <body>
        <t:beanEditForm object="myBean" />
        </body>
        </html>



        David Peterson created issue -

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            David Peterson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development