• kenmac54

    (@kenmac54)


    I recently upgraded to php 8.3 as WordPress kept warning me.

    One of my users uploaded a Microsoft Word document – using the normal combination of ctrl-A, ctrl-C and then ctrl-V in WordPress.

    The format went haywire, so I downgraded php (back to 8.0) and it now works.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Hi @kenmac54,

    From what I understand, the problem isn’t really with the Classic Editor itself. It’s caused by the WordPress function called wpautop(), which helps clean up text when you paste content from Microsoft Word.

    This function uses a PHP feature called DOMDocument. In newer PHP versions (8.0 to 8.3), DOMDocument became much stricter about handling messy or incorrect HTML.

    Since Microsoft Word often creates untidy HTML when you copy and paste from it, PHP 8.3 has trouble reading that code — which causes the strange formatting. When you switched back to PHP 8.0, it worked because that version is more forgiving with such errors.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.