最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

post content - replace control character ascii into page

programmeradmin3浏览0评论

I observe that a copy-paste containing the control character '^L' (ie FF) causes an error with 'vimrepress'.

Wordpress publishes the page but vimpress cannot load it. I would like to replace this '^L' character with a space in one and, if possible, several pages either with "adminer", or with a plugin, or from the editor.

Any ideas ?

NB: WP 5.4.1; mysql 5.7.28; PHP 5.6.39

I observe that a copy-paste containing the control character '^L' (ie FF) causes an error with 'vimrepress'.

Wordpress publishes the page but vimpress cannot load it. I would like to replace this '^L' character with a space in one and, if possible, several pages either with "adminer", or with a plugin, or from the editor.

Any ideas ?

NB: WP 5.4.1; mysql 5.7.28; PHP 5.6.39

Share Improve this question edited May 4, 2020 at 6:50 norman.lol 3,2313 gold badges30 silver badges35 bronze badges asked May 4, 2020 at 4:47 Dhénin Jean-JacquesDhénin Jean-Jacques 11 bronze badge
Add a comment  | 

1 Answer 1

Reset to default 0

first workaround:

  1. Edit the page under wordpress classic editor and copy (ctrl-C) the whole to the clipboard.
  2. Open the vim editor
  3. Copy (ctrl-V) the clipboard to the vim window
  4. Replace all control characters with a space    :%s/[^@-^M]/ /g (ie ctrl-V ctrl- @ and ctrl-V ctrl-M)
  5. Overwrite the page content in wordpress with the new vim content via the clipboard
发布评论

评论列表(0)

  1. 暂无评论