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

TagProtection can not deal with line breaks in HTML attributes

    XMLWordPrintable

Details

    • Critical
    • When using TagProtection (protect plain HTML code in XLF as tags) line breaks in HTML attributes were not probably resolved.

    Description

      Consider a XLF segment with the following trans-units:

      <trans-unit id="NFDBB2FA9-tu1" xml:space="preserve">
      <source xml:lang="de">Text mit &lt;b&gt;0&lt;/b&gt; in tags gab Probleme.</source>
      </trans-unit>
      
      <trans-unit id="NFDBB2FA9-tu2" xml:space="preserve">
      <source xml:lang="de">Text mit &lt;span data-text="böse
      Zeilen
      Umbrüche"&gt;Umbrüchen &lt;/span&gt; im Attribut gab Probleme.</source>
      </trans-unit>
      
      <trans-unit id="NFDBB2FA9-tu3" xml:space="preserve">
      <source xml:lang="de">Invalides XML &lt;img&gt; mit invaliden &lt;donotexist&gt;HTML Tags&lt;/donotexist&gt; müssen encodiert sein!</source>
      </trans-unit>
      

      all three cases were producing problems.

      • The first one led to invalid HTML content after import since the <b> tag was remaining in the content.
      • The second one was producing invalid XML stopping the AutoQA from parsing the segment
      • The third one led to remaining invalid XML / HTML fragments in the content

       

      Attachments

        Activity

          People

            tlauria Thomas Lauria
            tlauria Thomas Lauria
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: