We have an area where people can post comments, but some enter hundreds and hundreds of !!!!! and it forces the admin page to go off the chart.
So can a script operate that stops words of more than x characters wthout spaces?
How do you stop hundreds of the same chars without space?
Moderator: General Moderators
-
simonmlewis
- DevNet Master
- Posts: 4435
- Joined: Wed Oct 08, 2008 3:39 pm
- Location: United Kingdom
- Contact:
How do you stop hundreds of the same chars without space?
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
All the best from the United Kingdom.
Re: How do you stop hundreds of the same chars without space
overflow-wrap in CSS might suit your needs.
-
simonmlewis
- DevNet Master
- Posts: 4435
- Joined: Wed Oct 08, 2008 3:39 pm
- Location: United Kingdom
- Contact:
Re: How do you stop hundreds of the same chars without space
Mmm it's mre about preventing it than wrapping it.
I want to stop someone posting that sort of spamming rubbish.
I want to stop someone posting that sort of spamming rubbish.
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
All the best from the United Kingdom.
Re: How do you stop hundreds of the same chars without space
simonmlewis wrote:So can a script operate that stops words of more than x characters wthout spaces?
Code: Select all
preg_match('/[^\s]{20}/', $string);