Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-3542

Escape property values used as Metatype default values

    XMLWordPrintableJSON

Details

    Description

      For a component property defined as below:
      ~~~~~~~~~~~~
      static private final String DEFAULT_FILE_PATTERN = "(?i)index
      .html";

      @Property(value=DEFAULT_FILE_PATTERN)
      static private final String PN_FILE_PATTERN = "file.pattern";
      ~~~~~~~~~~~~

      The backslash gets eaten up in the felix web console. The default value should appear as (?i)index\.html but ends up looking like (?i)index.html. This regex has a different meaning than the one intended.

      The component gets the correct initial value. But things fail when you open the property editor and save without making any changes(because the editor loaded up with an incorrect default value). Note that the property values when saved from the property editor render correctly the next time the editor loads.

      Attachments

        Issue Links

          Activity

            People

              cziegeler Carsten Ziegeler
              ankurpathela Ankur Pathela
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: