Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve StripNick: allow more characters, insert placeholder or hex escape #2032

Open
bkil opened this issue Mar 31, 2023 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@bkil
Copy link

bkil commented Mar 31, 2023

  1. The original issue that StripNick aimed to fix is incorrect interpretation as rich text markup. This usually involves Markdown, BBCode and autolinking. A wide range of characters could still be considered safe in most contexts. Underscores are a bit trickier to handle but would also come in handy.

  2. If the nick contains accented characters, spaces (or for example is all lower case and only underscores or dots delimit the name parts) the current result of concatenation will become unreadable.
    It would be a simple, but effective improvement to insert a placeholder character in place of every group removed. Using an underscore or hyphen is a popular choice.

  3. An alternative would be to preserve the full information contained within the nick using a bidirectional mapping. A common choice is to escape problematic characters via either the percentile or the equals sign and 2 hex digits per input byte for this. IDN punycode would be another alternative, but it's both more complicated to implement and I personally wouldn't prefer that.

Just as a reference, here is the original regexp implementation:

Documented here:

@bkil bkil added the enhancement New feature or request label Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant