Opened 6 years ago
Closed 6 years ago
#4613 closed defect (bug) (fixed)
Entities HTML causes problems in WXR Import !
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 2.3 |
| Component: | Administration | Version: | 2.2.1 |
| Severity: | major | Keywords: | import, wxr, xml has-patch |
| Cc: |
Description
I have a problem with importer.
If categories have entites HTML, as "&" or "&" in name
During importing, Importer create "a zillion duplicate categories"
Because, in importer you clean title with
$categories[$cat_index] = $wpdb->escape($this->unhtmlentities(str_replace(array ('<![CDATA[', ']]>'), '', $category)));
And after the query return false...
Example : In DB you have
Category NAME : 'Toto & Blurps'
In Query (l.319) : 'Toto & Blurps'
"SELECT cat_ID FROM $wpdb->categories WHERE cat_name = '$category'"
See patch for one possible solution.
See XML for an example of the problem...
Attachments (1)
Change History (9)
momo360modena — 6 years ago
comment:1
momo360modena — 6 years ago
- Keywords wxr added; wsr removed
comment:2
foolswisdom — 6 years ago
- Milestone changed from 2.2.2 to 2.2.3
- Owner changed from anonymous to westi
- Status changed from new to assigned
The WP importer needs to be updated to use taxonomy and the sanitize term API.
comment:8
momo360modena — 6 years ago
- Resolution set to fixed
- Status changed from assigned to closed
Ok in changeset:5937
Note: See
TracTickets for help on using
tickets.

I'll take a look at this.
Is it possible to have an example import file with the issue?