MyBB Community Forums

Full Version: [F] Black color (editor)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
If you choose black as the color for some text in the editor you get
[color=#000]
It should be #000000 as some browsers have problems with the missing zeros.
Does this happen to be with all short hand color hexes? like #ccc, if so all our CSS is built up on that and has to be fixed.
Sorry, there was a misunderstanding. The problem is that the code tag does not get parsed if the zeros are missing. Examples:
[color=#000]text text text[/color]
text text text

[color=#000000]text text text[/color]
text text text

And there's another problem. You cannot use the color tag inside the color tag:
[color=#FF0000]text [color=#0000FF]text[/color] text[/color]
text text text
You can't use the same mycode tag inside same mycode tag. You'd need to close it first because our parser is "greedy".

Ah I know why that is, it checks that the hex color is 6 characters long. I fixed it in the jscript now anyways. Not sure if we should support shorthand hexes?
This bug has been fixed in the latest code.

Please note the latest code is not live on the site or for download. An update will be released which contains this fix.
Fixed file.