]> git.evergreen-ils.org Git - Evergreen.git/commit
LP#1243023: Teach oils_xpath() to decode specific enties in text nodes
authorMike Rylander <mrylander@gmail.com>
Mon, 3 Mar 2014 19:07:42 +0000 (14:07 -0500)
committerBen Shum <bshum@biblio.org>
Wed, 19 Mar 2014 01:25:26 +0000 (21:25 -0400)
commit6d079ea592f5982225689ec6abce9e602eff7b10
tree4adb19520466ec031fdfcaf5102b8961bd758d47
parentd59d8f95af806bf218f3c45fc558a582a91393da
LP#1243023: Teach oils_xpath() to decode specific enties in text nodes

Because of a behavioral change in Postgres' XML code (specifically, when
casting XML as TEXT, the Famous Five XML entities are not decoded), we
are seeing doubled encodings in XML and HTML output, as well as in indexed
data.  To combat this, we will now check the first character of each
array element returned by XPATH() and, if it is not '<', we will decode
the entities ourselves.

Also included in this commit is some cleanup of the surrounding file
content, which was just confusing and useless in the modern era.

The contents of his commit, followed by:

 =# drop function evergreen.oils_xpath(text,text,anyarray)

are enough to address the OP's complaint about browse data.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/sql/Pg/002.functions.config.sql