- changed title to Angle brackets not escaped correctly
Angle brackets not escaped correctly
I am using Tikal to convert docx/xlsx files to xliff files. I am experimenting if it works if the text contains brackets (e.g. <html>)
I found the start angel bracket is escaped but the end bracket is not.
<b>
I have also attatched a sample file.
In addition, I am trying to create an xliff editor. Now, it just edits target text with tags just like plain text. But what if there are plain text which just like xliff tags, how to handle them correctly?
example:
one segment: <g id=”1”>XLIFF has tags like <g>.<g/>
converted to plain text for editing: <g id=”1”>XLIFF has tags like <g>.<g/> (cannot work)
Thanks.
Comments (4)
-
reporter -
This behavior is not incorrect. Escaping of
>
is optional in XML, unless it appears as part of the string]]>
. See section 2.4 of the XML 1.0 spec:The ampersand character (&) and the left angle bracket (<) must not appear in their literal form, except when used as markup delimiters, or within a comment, a processing instruction, or a CDATA section. If they are needed elsewhere, they must be escaped using either numeric character references or the strings "
&
" and "<
" respectively. The right angle bracket (>) may be represented using the string ">
", and must, for compatibility, be escaped using either ">
" or a character reference when it appears in the string "]]>
" in content, when that string is not marking the end of a CDATA section.
-
Also, the XLIFF package writer supports optionally escaping this, but I think this is only exposed through Rainbow, not tikal.
-
- changed status to closed
- Log in to comment