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

TagProtection can not deal with line breaks in HTML attributes

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Test Ready (Final pull request made)
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: translate5 - 5.2.5
    • Component/s: Import/Export
    • Urgency:
      Critical
    • ChangeLog Description:
      When using TagProtection (protect plain HTML code in XLF as tags) line breaks in HTML attributes were not probably resolved.
    • Reporter issue no.:
      -

      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

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

              Dates

              Created:
              Updated:
              Resolved: