You are here

function nusoap_base::expandEntities in Salesforce Suite 5

Same name in this branch
  1. 5 includes/nusoap.php \nusoap_base::expandEntities()
  2. 5 includes/nusoap.orig.php \nusoap_base::expandEntities()
Same name and namespace in other branches
  1. 5.2 includes/nusoap.php \nusoap_base::expandEntities()
  2. 5.2 includes/nusoap.orig.php \nusoap_base::expandEntities()

* expands entities, e.g. changes '<' to '&lt;'. * *

Parameters

string $val The string in which to expand entities.: * @access private

2 calls to nusoap_base::expandEntities()
nusoap_base::serialize_val in includes/nusoap.php
* serializes PHP values in accordance w/ section 5. Type information is * not serialized if $use == 'literal'. * * @access public
nusoap_base::serialize_val in includes/nusoap.orig.php
* serializes PHP values in accordance w/ section 5. Type information is * not serialized if $use == 'literal'. * * @access public

File

includes/nusoap.php, line 318

Class

nusoap_base
nusoap_base

Code

function expandEntities($val) {
  if ($this->charencoding) {
    $val = str_replace('&', '&amp;', $val);
    $val = str_replace("'", '&apos;', $val);
    $val = str_replace('"', '&quot;', $val);
    $val = str_replace('<', '&lt;', $val);
    $val = str_replace('>', '&gt;', $val);
  }
  return $val;
}