feat: DisableUtfControlCharacterInNickname #1145
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
标题 / Title Here
添加了将 RTLO、LTRO 等 UTF 控制字符替换为空格的功能
描述 / Description
添加了将 RTLO、LTRO 等 UTF 控制字符替换为空格的功能。
实现方法为 Hook
TextView
的onPreDraw()
方法,判断是否有黑名单内字符,如有则将其替换为空格。预期实现为导致一次重绘,可能有一定性能下降,实际测试符合预期,未有较明显性能下降。
目前已知的问题为回复消息时,显示的被回复内容无法被 Hook 捕捉替换,怀疑为该处采用的
FasterTextView
并未继承自TextView
导致。修复或解决的问题 / Issues Fixed or Closed by This PR
添加了将 RTLO、LTRO 等 UTF 控制字符替换为空格的功能。
检查列表 / Check List
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).
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)