1. Okapi Framework
  2. Okapi and localization
  3. XLIFF Toolkit
  4. Pull requests

Pull requests

#5 Merged at bf23628
Repository
martinwunderlich
Branch
master
Repository
okapiframework
Branch
master

[Fix] Issue #527: ICML filter: Closing angled bracket in closing CDATA tag should be converted to XML entity

Author
  1. Martin Wunderlich
Reviewers
Description

Okapi needs to be updated to XLIFF2 toolkit 1.1.5. for this fix to take effect. Added 3bc4219750e56f08d6097ff3a67a6717167c1c3c to take into account Yves' comment.

Comments (5)

  1. Yves Savourel

    With the goal of avoiding to escape <![CDATA the fix looks fine. But I'm not sure it is the right solution for the issue.

    This change would put a true CDATA section inside a chunk of data where all other XML constructs are escaped. If we extract the same file to XLIFF 1.2 (using ph, bpt, ept), the resulting XLIFF has no trouble to be parsed as XML, but that seems to be because it escapes ]> to ]&gt; not because it doesn't escape <![CDATA. I have not tried, but when merging back, I'm not sure having true CDATA sections in the XLIFF will result in the expected ICML data.

    Any thoughts?

    1. Martin Wunderlich author

      I did a test and included this fix in our product. The CDATA section comes out fine after converting back from the translated XLIFF 2.0 to ICML. Also, I've created a local Rainbow build with the updated XLIFF toolkit and here is works ok, too. However, it could be that other tools are treating the CDATA section differently. So, if you think it's safe to escape the closing bracket instead of not escaping the opening bracken, then I can change it.

  2. Yves Savourel

    It looks like with the fix and using it in the RainbowKit steps we end up with a merged ICML where the CDATA sections markers are gone, but because the content in these sections were escaped in the XLIFF file, it ends up escaped in the merged ICML too. I guess InDesign (correctly) does not see a difference.

    If you are OK with replacing a CDATA section with an escaped section too, then that should be fine.

  3. Yves Savourel

    Thanks for the update Martin.

    I'm working on getting the 1.1.5-SNAPSHOT build: it seems okapi-xliff on CloudBees is having some re-provisioning issues.

    BTW: I've also seen a missing "break" in the changed code. It should be fixed now. I'll also add tests and move the license to Apache.

    I have to work on some ISO audit things today, so it may take a bit. But we should have a fixed snapshot eventually.