Charas-Project
Off-Topic => Really Old Stuff => Archive => PUB (Php Über Board) => Topic started by: AsakuraHao2004 on September 06, 2005, 06:53:35 PM
-
ok, I can guess the main reason of the quote error is because people fail to realize that it's case sensitive. So I figured, seeing as how you can do that whole thing where it turns bad words into asterisks, maybe you can make it to where "quote" would turn into "QUOTE".
Or, alternativly, maybe you could make it to where either entry would be valid for quoting.
-
The word cencor with quote into QUOTE, I like it
-
That is actually a good idea, and it doesn't sound like it'd be too hard.
That won't solve the problem entirely, though. There's still the chance of misspelling the tag or forgetting one of the brackets or the backslash on the end tag. But those can't really be fixed automatically.
-
Just make the censor change all typo's into the full quote, it would probably be around 5-6 different typo combinations but it could work.
-
Or, just preg_replace it instead of str_replacing it. It works better than str_replace.
However, seeing as it can also cause a no multi-quoting thing, I have another idea: preg_match. preg_match all , then all
. Then compare the size of both arrays. If it doesn't match, then it will only str_replace / preg_replace it until either one has no more entries to be replaced.
Oh, and please, get rid of the case-sensitivity on the quote-side too. You already did it with the -tags.