mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-04 10:32:40 +00:00
Fixes #6318: Incorrect whitespace handling/parsing of XML documents
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8158 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
c8cf1a2c5b
commit
9f15226e46
2 changed files with 26 additions and 1 deletions
|
@ -880,10 +880,11 @@ class Xml extends XmlNode {
|
|||
*/
|
||||
function parse() {
|
||||
$this->__initParser();
|
||||
$this->__rawData = trim($this->__rawData);
|
||||
$this->__header = trim(str_replace(
|
||||
a('<' . '?', '?' . '>'),
|
||||
a('', ''),
|
||||
substr(trim($this->__rawData), 0, strpos($this->__rawData, "\n"))
|
||||
substr($this->__rawData, 0, strpos($this->__rawData, '?' . '>'))
|
||||
));
|
||||
|
||||
xml_parse_into_struct($this->__parser, $this->__rawData, $vals);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue