Uploaded image for project: 'translate5'
  1. translate5
  2. TRANSLATE-3151

Import of xliff file fails because of > inside an attribute value of a ph tag

    XMLWordPrintable

Details

    • High
    • Introduce a xmlpreparse config which cleans and normalizes the XML structure of the imported XLF files.

    Description

      If an xliff contains a > inside an attribute value of a ph tag, the import fails.

      The segment that causes the problem looks like this:

      <source>
      <ph id="5" x="& lt;lvlIndex value=& quot;%1& quot;{}/>">{5}
      </ph>.
      </source>

      I put a space after the &, because otherwise Jira displays the value for which the entity stands instead of the entity.

      Please see linked TS issue for an example xliff file.

      Solution:

      since the problem could not be fixed by a modified regular expression, an optional pre-parsing of the XML is introduced which normalizes the XML - so that all > characters are properly encoded.

      Attachments

        Activity

          People

            leonkiz Leon Kiz
            marcmittag Marc Mittag [Administrator]
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: