Fixed Maximum printable characters in signature bug

Martok

Well-known member
I think this may be a bug but it may be as designed.

I will be setting up signature permissions to allow users to have 1 image, 1 line of text (above or below this) and set the maximum printable characters to 255 characters.

On first set up, I set maximum lines to 1. This wouldn't allow the line of text below the image so I had to set it to 2. I guess this is as designed?

I then put in my signature of an image (with a URL link) and lots of text to test the permissions. They worked initially as expected, giving me errors about the line being too long and then there being too many characters. However, when I reduced the number of characters in my text to 255, it still told me I had too many characters. I eventually got it working with this:

Code:
[URL='http://www.seniorgamers.net'][IMG]http://www.seniorgamers.net/sigs/martoksig.jpg[/IMG][/URL]
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678

Counting the text that will display (i.e. the numbers), there are 208 characters.
If you remove the URL and IMG tags, that leaves this:

Code:
http://www.seniorgamers.net/sigs/martoksig.jpg
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678

That's 254 characters and a line break.

So it seems that it is counting both line breaks and any URLs within IMG tags.

I can see the argument of line breaks being counted as printable characters (even though you can't really see them as such) but is it correct that IMG URLs are being counted as printable characters, or is this a bug?
 
I have max chars set to 200 and using a variation of your text, this is accepted:
Code:
[URL='http://www.sen1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678iorgamers.net'][IMG]http://www.seniorgamers.net/sigs/martoksig.jpg[/IMG][/URL]

Which suggests the URL content isn't being included.

It is only when I add the digits to the IMG tag that it is rejected.
 
So it seems that, as expected, it's not counting any BBCode tags themselves. However, if it's not actually inside the actual BBCode tag itself (such as the URL that is between IMG tags) then it includes it in the printable characters count.
 
The image URL is counted whether it is in the IMG tags or not.

Both of these are rejected for being over 200 chars:
Code:
[IMG]http://www.seniorgamers.net/sigs/martoksig1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678.jpg[/IMG]

Code:
http://www.seniorgamers.net/sigs/martoksig1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678.jpg

The first one is 265 chars, the second one 254 chars.
 
Have to wait for Mike or Kier to respond but I have a feeling it is as designed as you can prohibit images in signatures but allow links, and as such, someone could post a link to an image.
 
So I made a few tweaks here...
  • Line breaks are no longer counted as printable characters. Previously, they would've counted as 1 or 2 characters and that was OS dependent. Now they don't count and the line limit should be used.
  • The child text of an image or media element no longer counts as printable characters.
  • The [*] inside a list no longer counts as printable
 
Back
Top Bottom