PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Web Services » XML_RPC » Bug #7116

Truncation of new lines where there shouldn't be

Details

Submitted2006-03-14 09:37 UTC
Fromcontax at phrenetic dot org
StatusDuplicate
PackageXML_RPC
PHP Version4.3.9
OSLinux ABOX 2.6.14-1.1653_FC4sm
Roadmaps(Not assigned)

Comments

[2006-03-14 09:37 UTC] contax at phrenetic dot org

Description:
------------
Line 1207 of XML/RPC.php does nasty things:

$this->payload = ereg_replace("[\r\n]+", "\r\n", $this->payload);

It ensures that there is never more that one line break concurrently throughout the entire XML request. So if you're sending the following string:

"This

is

some

text"

It will be converted to:

"This
is
some
text"

I'm not too sure why this line is require in the first place. Commenting out the line doesn't seem to have an adverse effect.