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

Sanitize control characters in input str (#144) #164

Merged
merged 3 commits into from
Mar 11, 2024
Merged

Conversation

marekmaskarinec
Copy link
Member

No description provided.

@marekmaskarinec marekmaskarinec requested a review from ske2004 March 8, 2024 11:12
@ske2004
Copy link
Member

ske2004 commented Mar 11, 2024

This will work for UI but I think it's actually better to sanitize it from within Tophat itself, because we don't really want inconsistent behavior across platforms.

Signed-off-by: Marek Maškarinec <marek@mrms.cz>
@marekmaskarinec marekmaskarinec changed the title Sanitize control characters in textbox input (#144) Sanitize control characters in input str (#144) Mar 11, 2024
@ske2004
Copy link
Member

ske2004 commented Mar 11, 2024

I'll test and merge if it works.

@ske2004
Copy link
Member

ske2004 commented Mar 11, 2024

Ok, it doesn't work but there's a simple reason, the problematic character is DEL, whose code is 127. I can fix that though. My main concern is, do we include \n and \t or do we handle it as .enter/.tab keys? For now I'm going to say the latter.

@ske2004 ske2004 merged commit d260d2c into main Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants