miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
Bugs miniBB Support Forums / Bugs /   

Ending parenthesis in alt/title within img[s] tag is not stored

Author Karel II
#1 | Posted: 18 Feb 2008 05:43 
When I upload a picture with description (alt tag) looking like this

hello (hello)

alt/title is stored like this (without ending/closing parenthesis):

hello (hello

- seems like some minor parsing problem. Can you confirm it? (It happens in my forum, I do not feel like writing 20 posts to miniBB test forum to be allowed to test it in lab conditions).

Author Paul
Lead Developer
#2 | Posted: 18 Feb 2008 05:55 | Edited by: Paul 
I confirm this bug exists, so the script "eats" the last parenthesis for some reason... still have no idea how to fix it :-(

Author Paul
Lead Developer
#3 | Posted: 7 May 2008 05:07 
Bringing this issue back... first I thought it was a regular expression issue; now after going deeply, I see it appears because of this line under bb_func_txt.php (function textFilter):

$text=str_replace(array('."', ',"', '-"', ':"', ';"', ')"'), '"', $text);

So you may also enter as an alt tag: hello; or hello- or hello. - the last character will be cut off.

Why does it happen? I have no idea. This string was introduced somewhere in the version 2 demos and I forgot already what it means. But probably it works something out.

So you can remove the parenthesis from str_replace function and it should work for you. Unfortunately I have no other ideas how to fix it - except you should not use parentheses in ALT tag since this is very, very rare...

Author Paul
Lead Developer
#4 | Posted: 7 May 2008 05:56 | Edited by: Paul 
Addition: it was a battle to go back in my own brain :-) But now I think I remember why this thing was introduced.

When for example you post a straight URL in your message, like, and end it with some kind of punctuation symbol like dot, comma, semicolon etc., it may appear that this symbol is included in the HREF part of the URL tag itself, and it causes the URL to be opened properly. Most commonly you won't be able to just click on it - it will produce a 404 not found error on the server side.

This string in theory fixes such rare situation, it replaces the ending symbol with a quote to the quote sign only.

But as we see now this also affect image tags which is not good :-)

I think the proper update will be to patch urlMaker function like I did already here for miniBB forums. So bb_func_txt.php file will be released amongst the next version of miniBB.

Author tom322
#5 | Posted: 7 May 2008 10:28 
I tested it on one site and can confirm it works correctly now. Thanks.

Bugs miniBB Support Forums / Bugs / Ending parenthesis in alt/title within img[s] tag is not stored Top

Your Reply Click this icon to move up to the quoted message

 Short link for this topic:

You are welcome to post anonymously, by entering a nickname with no password (if the similar Username has not been taken yet), or by leaving both fields empty. If you have a forums account, you can also sign in from this page without posting a message, or sign in and post at once.

Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.
miniBB Support Forums Powered by Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
Proceed with the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB