Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not write out invalid characters to XML file. #147

Closed
wants to merge 1 commit into from
Closed

Do not write out invalid characters to XML file. #147

wants to merge 1 commit into from

Conversation

rodrigc
Copy link
Contributor

@rodrigc rodrigc commented Oct 1, 2015

For special characters such as: <, >, or ', write them out
to the file as:
&#[decimal ASCII value];

Character Written to Appears in Jenkins
to encode XML file test result viewer
========= ========== ==================
< < <

       &#62;             >

' ' '

For characters which are listed as RestrictedChar
in http://www.w3.org/TR/xml11/#charsets , these characters
are completely invalid XML, and cannot even be escaped.

Character Written to Appears in Jenkins
to encode XML file test result viewer
========= ========== ==================
0x08 &#8; �
0x1F &#31; �

This will at least generate a valid XML file,
but let us see where these restricted characters would
appear in the output.

Fixes #136

For special characters such as: <, >, or ', write them out
to the file as:
    &#[decimal ASCII value];

Character     Written to    Appears in Jenkins
to encode     XML file      test result viewer
=========     ==========    ==================
  <            &lt;             <
  >            &gt;             >
  '            &apos;           '
  &            &amp;            &
  "            &quot;           "

For characters which are listed as RestrictedChar
in http://www.w3.org/TR/xml11/#charsets , these characters
are completely invalid XML, and cannot even be escaped.

Character     Written to    Appears in Jenkins
to encode     XML file      test result viewer
=========     ==========    ==================
  0x08         &amp;#8;          &#8;
  0x1F         &amp;#31;         &#31;

This will at least generate a valid XML file,
but let us see where these restricted characters would
appear in the output.

Fixes #136
@rodrigc rodrigc closed this Oct 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant