Export: Use correct escaping function for term IDs in <wp:term> nodes.

Follow-up to [34333].

Props DrLightman, marcio-zebedeu.
Fixes #50113.

git-svn-id: https://develop.svn.wordpress.org/trunk@47789 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2020-05-14 07:53:57 +00:00
parent 6e00150660
commit d0d9c1465c

View File

@ -501,7 +501,7 @@ function export_wp( $args = array() ) {
<?php endforeach; ?>
<?php foreach ( $terms as $t ) : ?>
<wp:term>
<wp:term_id><?php echo wxr_cdata( $t->term_id ); ?></wp:term_id>
<wp:term_id><?php echo intval( $t->term_id ); ?></wp:term_id>
<wp:term_taxonomy><?php echo wxr_cdata( $t->taxonomy ); ?></wp:term_taxonomy>
<wp:term_slug><?php echo wxr_cdata( $t->slug ); ?></wp:term_slug>
<wp:term_parent><?php echo wxr_cdata( $t->parent ? $terms[ $t->parent ]->slug : '' ); ?></wp:term_parent>