Bug 41254 - itstool crash when po contains invalid xml
Summary: itstool crash when po contains invalid xml
Status: RESOLVED FIXED
Alias: None
Product: ITS Tool
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Shaun McCance
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-27 05:37 UTC by Vincent Untz
Modified: 2011-09-27 07:11 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Vincent Untz 2011-09-27 05:37:09 UTC
This is the itstool part of https://bugzilla.gnome.org/show_bug.cgi?id=660231

If a translation has some wrong tag (like "</gui>test<gui>"), then itstool 1.1.1 crashes:

  File "/usr/bin/itstool", line 974, in <module>
    doc.merge_translations(translations, opts.lang)
  File "/usr/bin/itstool", line 657, in merge_translations
    self._check_errors()
  File "/usr/bin/itstool", line 336, in _check_errors
    raise libxml2.parserError(self._xml_err)
libxml2.parserError:  Entity: line 1:  parser  error :  Opening and ending tag mismatch: title line 1 and gui

The right thing to do here is to not just ignore the translation (and fail during make check).
Comment 1 Shaun McCance 2011-09-27 07:11:54 UTC
Fixed on master.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.