Timeline for Why do I lose all the slashes, i.e., " \ ", in my blogs when I import XML files by the WordPress Importer plug-in?
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 31, 2017 at 1:18 | comment | added | Mark Berry | The fix that was implemented (see my answer) was made to the importer plugin and wound adding slashes to each type of content before calling the import proc (which I guess is in WordPress core?). Although not included in the initial fix, I found a way to apply the same approach to comments as well. | |
Feb 2, 2017 at 5:13 | comment | added | Michael Hampton |
@MarkBerry WP doesn't have a filter for comment content in the exporter, as it does for post content. This is a nasty oversight, as is the lack of addslashes() to begin with.
|
|
Jun 4, 2015 at 0:03 | comment | added | Mark Berry | Over three years later, with WordPress 4.2.2, this is still an issue. This plugin seemed to work for posts. I don't think it handled comments--I found one comment with backslashes stripped out. | |
Apr 29, 2012 at 11:13 | comment | added | fuxia♦ |
I'm not sure. You would have to apply addslashes before the slashes are stripped … which happens very early. Because once they are removed there is no way to say where they should have been preserved. Changing the export is much easier.
|
|
Apr 29, 2012 at 11:03 | comment | added | shuiruge | So professional! It can add slashed when export, I guess. While, what I want to do is to add slashes when import. Is there any problem if I add slashes in this way when import, rather than when export? (I guess there is. Because if there is not, there will be no need to run stripslashes_deep() when import. I'm a new guy.) Thanks very much! | |
Apr 29, 2012 at 8:39 | history | answered | fuxia♦ | CC BY-SA 3.0 |