Uploaded image for project: '[Read Only] - Hippo Site Toolkit 2'
  1. [Read Only] - Hippo Site Toolkit 2
  2. HSTTWO-1518

Trailing whitespace in HST configuration causes errors

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • 2.05.03
    • 2.21.01
    • None
    • None

    Description

      When exporting hst:configuration nodes from the repository, the resulting XML files are often formatted. Depending on the XML editor and its configuration, this can introduce whitespace. A common example is the introduction of a linebreak and multiple whitespace characters like below:

      Incorrectly formatted:

      <sv:property sv:name="hst:componentclassname" sv:type="String">
      <sv:value>org.example.MyComponent
      </sv:value>
      </sv:property>

      This causes errors, and the component not loading. The workaround is easy: remove the linebreak and whitespace like below

      <sv:property sv:name="hst:componentclassname" sv:type="String">
      <sv:value>org.example.MyComponent</sv:value>
      </sv:property>

      but this can be completely prevented by a simple trim() on in the HST code to trim any whitespace.

      The same issue occurs for several different configuration settings, including component classnames, and sitemenu paths.

      Attachments

        Activity

          People

            aschrijvers Ard Schrijvers
            nvankampenhout Niels van Kampenhout
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: