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

feat: DisableUtfControlCharacterInNickname #1145

Merged
merged 1 commit into from
Aug 22, 2024
Merged

Conversation

Allenyou1126
Copy link
Contributor

标题 / Title Here

添加了将 RTLO、LTRO 等 UTF 控制字符替换为空格的功能

描述 / Description

添加了将 RTLO、LTRO 等 UTF 控制字符替换为空格的功能。

实现方法为 Hook TextViewonPreDraw() 方法,判断是否有黑名单内字符,如有则将其替换为空格。

预期实现为导致一次重绘,可能有一定性能下降,实际测试符合预期,未有较明显性能下降。

目前已知的问题为回复消息时,显示的被回复内容无法被 Hook 捕捉替换,怀疑为该处采用的 FasterTextView 并未继承自 TextView 导致。

修复或解决的问题 / Issues Fixed or Closed by This PR

添加了将 RTLO、LTRO 等 UTF 控制字符替换为空格的功能。

检查列表 / Check List

  • 我已经在预期的 QQ 或 TIM 版本上测试了这些更改,并确认它们能够正常工作,不会破坏任何东西(尽我所能)。
    I have tested these changes on the expected version and confirmed that they work and don't break anything (as well as I can manage).
  • 我的改动不会导致本模块丢失对旧版 QQ 或 TIM 的支持。
    My changes will not cause this module to lose support for older versions of QQ or TIM。
  • 我已经合并了对后续工作无意义的提交,并确认它们不会对后续维护造成破坏。(必须)
    I have merged commits that are meaningless for follow-up work and confirmed that they will not cause damage to follow-up maintenance. (Required)

@qwq233 qwq233 merged commit 93a79d3 into cinit:main Aug 22, 2024
2 checks passed
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