PHP to clean-up pasted Microsoft input

前端 未结 4 1937
无人共我
无人共我 2020-11-29 11:43

I have a site where users can post stuff (as in forums, comments, etc) using a customised implementation of TinyMCE. A lot of them like to copy & paste from Word, which

4条回答
  •  我在风中等你
    2020-11-29 12:11

    In my case, there was a pattern. The unwanted part always started with

    
    

    So my solution was to cut out everything before and after this block:

    $array = explode("'),10);
    echo $begin.$end;
    

提交回复
热议问题