Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#17776 closed defect (bug) (duplicate)

Blogger Importer extra > in title and body

Reported by: workshopshed's profile Workshopshed Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.1.4
Component: Import Keywords:
Focuses: Cc:


The title and the body of the imports have an extra > present prefixed.

Blogger Importer version 0.3 on PHP 5.3.2.
N.B. Problem does not exist for PHP 5.2.2

Problem has been traced to the CData function im the XML parser which is treating an array like a string which acts differently in 5.3.

The correct solution is not to change end element but to add an extra "if" into the cdata function as follows

function cdata($parser, $data) {
		#print str_repeat(" ", $this->depth * $this->indent) . "data: #" . $data . "#\n";
		if (!empty($this->in_content)) {
			// handle self-closing tags (case: text node found, need to close element started)
            // AGC:Fix 2011-04-08 Error with StrPos expects first parameter to be a string not an array
            if (count($this->in_content) > 1) {
    			if (strpos($this->in_content[count($this->in_content)-1], '<') !== false) {
    				array_push($this->in_content, ">");
			array_push($this->in_content, $this->xml_escape($data));


Change History (4)

#1 @Workshopshed
13 years ago

Just checked, this problem also exists in Blogger importer 0.4

#2 @Otto42
13 years ago

Dupe. #14525

Also, new branch will fix the problem.

#3 @Otto42
13 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

#4 @ocean90
13 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.