Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-1015

StringResourceModel does not escape interpolated properties

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.2.6
    • 1.3.0-rc1
    • wicket
    • None

    Description

      StringResourceModel does not escape single quotes from interpolated strings which causes unexpected behavior when using with message formatters.

      Consider the following string:
      mystring=This string contained ${property} and message formatter placeholders

      {0}.

      new StringResourceModel("mystring", component, model, new Object[] {"some string"});

      ${property} = resolved'property

      The following string is passed to MessageFormat: This string contained resolved'property and message formatter placeholders {0}

      .

      This will cause MessageFormat to not replace

      {0}

      with the first parameter because it is waiting for another single quote to end the escaping.

      Attachments

        Activity

          People

            Unassigned Unassigned
            crumley Ryan Crumley
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: