What I'm trying to accomplish is this:
I have a character limit on objects' short descriptions. It works fine -- restricts the short desc to 59 characters.
However, it's counting color codes. So while it might be 59 visible characters ("a pair of blue jeans with some noticeable wear on the knees"), adding color to it ("a pair of #cblue jeans#n with some noticeable wear on the knees") counts #c and #n as 4 extra characters, thus disallowing it.
How does one make it so color codes aren't counted? Does anyone have any experience with this?
I have a character limit on objects' short descriptions. It works fine -- restricts the short desc to 59 characters.
However, it's counting color codes. So while it might be 59 visible characters ("a pair of blue jeans with some noticeable wear on the knees"), adding color to it ("a pair of #cblue jeans#n with some noticeable wear on the knees") counts #c and #n as 4 extra characters, thus disallowing it.
How does one make it so color codes aren't counted? Does anyone have any experience with this?