How to wrap long lines without spaces in HTML?

前端 未结 14 1914
旧巷少年郎
旧巷少年郎 2020-12-01 03:28

If a user types in a long line without any spaces or white space, it will break formating by going wider than the current element. Something like:

HA

14条回答
  •  不知归路
    2020-12-01 03:57

    I know that this is a really old problem and since I had the same problem I searched for a easy solution. As mentioned in the first post I decided to use the php-function wordwrap.

    See the following code example for information ;-)

    ", true);
    ?>
    
        
            test
        
        
            
    test
       

    Hope this helps.

提交回复
热议问题