Make WordPress Core

Opened 15 years ago

Closed 15 years ago

Last modified 9 years ago

#9212 closed defect (bug) (duplicate)

Livejournal importer dropping '<' on all HTML tags

Reported by: amaiman's profile amaiman Owned by: beaulebens's profile beaulebens
Milestone: Priority: normal
Severity: major Version: 2.8
Component: Import Keywords: LiveJournal, import, HTML, tags
Focuses: Cc:


Whenever I use the Livejournal API importer in trunk to attempt to import posts from Livejournal, the importer strips the "<" from every HTML tag, thus outputting unusable results. (The tags are visible in the post, since they don't get processed by the browser without the "<", thus all formatting/images/etc. in the posts are lost.)

I have tried this with both my Livejournal (containing over 100 posts) and a new journal that I created containing only a test post with various HTML tags, I got the same results with both.

This problem may not be within the livejournal.php file, it may have been caused by a change to some other component within Wordpress trunk, I haven't had the time to track it down and I'm not particularly familiar with the Wordpress source yet. This behavior is occurring with the version of trunk current as of the time this ticket was entered.

An example:

Source post in Livejournal:

Testing this post.

<img src="">

More tests:

<a href="">Link</a>

<a href=""><img src=""></a>


Resulting contents in Wordpress after running the importer:

Testing this post.

img src="">

More tests:

a href="">Link/a>

a href="">img src="">/a>


Change History (7)

#1 @amaiman
15 years ago

I verified that this problem is not being caused by any problems with my particular web server. (Tested by creating a new Linux/Apache/PHP/MySQL install on clean Amazon EC2 image and installed trunk -- same results when I tried to import from Livejournal).

#2 @DD32
15 years ago

  • Version set to 2.8

That doesn't mean that its not a well-known bug in certain versions of the XML parser library.

Is there a Livejournal test import available somewhere so i can play with it? (I Cant remember the location of test data.. or if theres even one..)

#3 @amaiman
15 years ago

The new version of the importer imports directly from a Livejournal account. I created a new account to do my tests ( and made a post containing the HTML that's in the ticket above.

#4 @amaiman
15 years ago

It does appear that is has something to do with the version of the XML parser library. I fired up another EC2 image (an older one this time), and the import was successful. We'll need to figure out the specific versions that are causing the problem and either work around it or have the importer show some kind of warning.

#5 @josephscott
15 years ago

Or use non-broken version combinations of PHP & libxml2. This means PHP 5.2.9 and libxml2 2.7.3. I've written about this issue before:

With the release of PHP 5.2.9 there are now officially released versions of both products that work again.

#6 @amaiman
15 years ago

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

Thanks for the info, I hadn't found it before I opened this ticket.

Upgrading my server to PHP 5.2.9 resolved the problem for me.

I'll close this ticket, reference ticket#7771 for further discussion. Perhaps a check/warning message should be added to Wordpress if a broken version is detected.

#7 @DrewAPicture
9 years ago

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