ApiFormatXml: remove broken xmldoublequote param
authorKevin Israel <pleasestand@live.com>
Tue, 9 Apr 2013 00:25:47 +0000 (20:25 -0400)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 10 Apr 2013 00:32:43 +0000 (00:32 +0000)
commit9d10834864d87beae6062ccdc88085a9348ef641
treeab8a7336ca88ddc275e0f22f0814fec538cf24bb
parent4f741418fcb0a85f1ccfa3a72e5faa34259b8e53
ApiFormatXml: remove broken xmldoublequote param

r55641 was a refactoring of ApiFormatXml::recXmlPrint() that added
a $doublequote parameter, yet the parameter was not actually passed
along in recursive calls, rendering the formatter's xmldoublequote
parameter useless.

XPath support was the sole reason this parameter was added. It was
argued that because in the XPath 1.0 grammar, a Literal is:

    '"' [^"]* '"' | "'" [^']* "'"

it is not possible to match attribute values that contain both an
apostrophe and a double quote.

However, conforming XPath implementations include a concat() function
that can be used to work around this limitation. Furthermore, XPath 2.0
allows escaping a double-quoted " as "" (and a single-quoted ' as '').

Because there was no Bugzilla report (other than mine) filed in the
last 3-1/2 years, and working around the XPath flaw is possible, I
think it's safe to remove the parameter. The worst that could happen
is that a not-very-robust API client chokes on the "Unrecognized
parameter" warning.

Bug: 46626
Change-Id: I9a4d8c13b78ffd2634d03c8c8b4bbeff69f4bc08
RELEASE-NOTES-1.22
includes/api/ApiFormatXml.php