miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Bugs miniBB Support Forums / Bugs /  
 

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

 
Author Karel II
Partaker
#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 
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 
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 https://www.minibb.com/forums/, 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
Active Member
#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
 Share Topic's Link

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


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Install the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑