pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: andreas@apkudo.com
Subject: BUG #16277: xmlelement allows invalid XML characters when XML version is set to 1.0
Date: Tue, 25 Feb 2020 18:58:57 +0000
Message-ID: <16277-efdbe9891408668e@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      16277
Logged by:          Andreas Lennartsson
Email address:      andreas@apkudo.com
PostgreSQL version: 10.7
Operating system:   Ubuntu
Description:        

The following example:
SELECT
  xmlroot (
     xmlelement (name "test", CHR(26))
  , version '1.0'
  )

Produces xml with the invalid ASCII character 26.

The documentation states:
Element content, if specified, will be formatted according to its data type.
If the content is itself of type xml, complex XML documents can be
constructed.
Content of other types will be formatted into valid XML character data. This
means in particular that the characters <, >, and & will be converted to
entities. Binary data (data type bytea) will be represented in base64 or hex
encoding, depending on the setting of the configuration parameter xmlbinary.
The particular behavior for individual data types is expected to evolve in
order to align the SQL and PostgreSQL data types with the XML Schema
specification, at which point a more precise description will appear.



view thread (5+ messages)  latest in thread

Message-ID: <16277-efdbe9891408668e@postgresql.org>
Permalink:  ../16277-efdbe9891408668e@postgresql.org/
Also on:    postgresql.org/message-id/16277-efdbe9891408668e@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, andreas@apkudo.com
  Subject: Re: BUG #16277: xmlelement allows invalid XML characters when XML version is set to 1.0
  In-Reply-To: <16277-efdbe9891408668e@postgresql.org>
  References: <16277-efdbe9891408668e@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox