Extraneous tags which are not escaped in XML target file

Issue #271 new
Manuel Souto Pico created an issue

Preconditions

  • File: XML file, containing text node <text>Look at Step 4.</text>
  • Filter: Okapi XML
  • Filter options include escapeGT="yes" (file okf_xml@oat.fprm included in the project attached)

Steps

  1. Translate source "Look at Step 4." as "<g1>Popatrz na Etap 4.</g1>" (which is an incorrect translation, as it happens when the user carries over a match that contains those tags).
  2. Create the target files

Expected results

The angle brackets are escaped in translated node in the target file:

<text>&lt;g1&gt;Popatrz na Etap 4.&lt;/g1&gt;</text>

Actual results

The angle brackets are escaped in translated node in the target file:

<text><g1>Popatrz na Etap 4.</g1></text>

The unexpected <g1> and </g1> inline nodes break the final application.

More info

The problem has been originally reported in the OmegaT tracker. Hiroshi Miura (OmegaT developer) had a good look at the problem and concluded that the bug is in Okapi Filters Plugin for OmegaT, not OmegaT, and asked okapi project to fix it.

He pushed bug reproducible test case, with detailed explanations.
https://bitbucket.org/okapiframework/omegat-plugin/pull-requests/22

Email threads:

Original ticket in the OmegaT tracker:

Comments (4)

  1. Manuel Souto Pico

    @DenisKonovalyenko, I guess you’re referring to pull request #24. I have tested your patch, the issue is not reproducible any more. Thanks a lot!

  2. Log in to comment