Topic: usernames with quotations
I have users who have registered with quotes " " in their names, it's braking the [ quote ] in posts. How can I stop them from registering with quotes?
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.2 bug reports → usernames with quotations
I have users who have registered with quotes " " in their names, it's braking the [ quote ] in posts. How can I stop them from registering with quotes?
It shouldn't break the quotes. For example:
asdf
There's a special case if the username starts and ends in quotes, then the quotes won't show in the "User wrote:" part of the quote box, but other than that, it should work.
Well, it's breaking them. The user's name is like hello "aka" good-bye.
this is a quote
When I remove the quotations from the name the quotes are rendered normally and the rest of the page is not broken.
This is a test
Can I stop them from registering with quotations?
Ahh see everything is screwy..
Parser is messing up. Its generating the closing tag for the blockquote but not the oppening tag among other things. Generally the tags are ending up improperly nested. Great fun.
Ah, I see Lemme think.
Solution. Open up include/parser.php and look for
$text = preg_replace('#\[quote=("|"|\'|)(.{2,25})\\1\]#seU', '"</p><blockquote><div class=\"incqbox\"><h4>".str_replace(\'[\', \'[\', \'$2\')." ".$lang_common[\'wrote\'].":</h4><p>"', $text);
Replace it with:
$text = preg_replace('#\[quote=("|"|\'|)(.*)\\1\]#seU', '"</p><blockquote><div class=\"incqbox\"><h4>".str_replace(\'[\', \'[\', \'$2\')." ".$lang_common[\'wrote\'].":</h4><p>"', $text);
That should do it.
Should that be a permenant change.
Yes. At least for now. I really don't know why it happens. The old {2,25} should work, but apparently, it doesn't. Man, I wish there was a way to debug regular expressions.
Thank-you!
Man, I wish there was a way to debug regular expressions.
No kidding... *sigh*
Rickard:
I just searched with Google for "regex debug". Is this something, that might be useful?
http://www.esperan.com/regex.html
Greetings
Cool, I'll have to check it out.
..and for pbb 1.2.5 with
Total number of registered users: 934
Total number of topics: 422
Total number of posts: 2946
and because of the high nomber of posts i need a script or something to remove
[right][snapback]xxx[/right][/snapback] i can not do manually
thx
PunBB Forums → PunBB 1.2 bug reports → usernames with quotations
Powered by PunBB, supported by Informer Technologies, Inc.