If my post title is : Hello <b>world</b>
When exporting the posts with built-in Tools/Export, html tags are removed. I don't want that.
I have 9K posts to export with valuable styling in all titles, so even if it is not the best practice, these tags need to be kept.
In what file is the xml generated ?
Or is there some kind of hook for this ?
Thank you.
If my post title is : Hello <b>world</b>
When exporting the posts with built-in Tools/Export, html tags are removed. I don't want that.
I have 9K posts to export with valuable styling in all titles, so even if it is not the best practice, these tags need to be kept.
In what file is the xml generated ?
Or is there some kind of hook for this ?
Thank you.
Share Improve this question edited Feb 2, 2021 at 12:33 jDelforge asked Feb 2, 2021 at 11:15 jDelforgejDelforge 1051 silver badge10 bronze badges 6 | Show 1 more comment1 Answer
Reset to default -1In the file wp-admin/includes/export.php
Within the post loop, line 545, simply replace
$title = apply_filters( 'the_title_rss', $post->post_title );
with
$title = $post->post_title;
unfiltered_html
capability, which lets you do dangerous things. Even if your XML file contained the tags in the header on export, there's no guarantee that they won't be stripped out on import, or that the theme on the other site will even support it – Tom J Nowell ♦ Commented Feb 2, 2021 at 11:29