openplanet-nl / issues

Issue tracker for Openplanet.
10 stars 0 forks source link

Text::StripFormatCodes empty link oversight #528

Closed Miltant closed 1 month ago

Miltant commented 1 month ago

I see a bug in the regex powering StripFormatCodes that was recently posted on the Openplanet Discord (\$([0-9a-fA-F]{1,3}|[iIoOnNmMwWsSzZtTgG<>]|[lLhHpP](\[[^\]]+\])?)): links with an empty uri in brackets get the $ and letter stripped, but the brackets remain.

For example with "Open$l[]planet": Text::StripFormatCodes output: "Open[]planet" Game rendering: "Open[planet]()"

codecat commented 1 month ago

Maybe it renders like this in Maniaplanet? It doesn't actually render any link in Trackmania. Either way, fixed 😊