Skip to content

Commit

Permalink
Merge pull request #274 from Ikaros-521/owner
Browse files Browse the repository at this point in the history
入场和礼物感谢部分删除用户名中存在的特殊符号
  • Loading branch information
Ikaros-521 authored Sep 2, 2023
2 parents d605cac + bfd5d9a commit cacac99
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1573,6 +1573,7 @@ cmd运行`npm i docsify-cli -g`
- 2023-09-02
- 补充、删减部分违禁词
- 补充遗漏的zhipuai库
- 入场和礼物感谢部分删除用户名中存在的特殊符号

</details>

Expand Down
4 changes: 4 additions & 0 deletions utils/my_handle.py
Original file line number Diff line number Diff line change
Expand Up @@ -995,6 +995,8 @@ def gift_handle(self, data):

# 合并字符串末尾连续的* 主要针对获取不到用户名的情况
data['username'] = My_handle.common.merge_consecutive_asterisks(data['username'])
# 删除用户名中的特殊字符
data['username'] = My_handle.common.replace_special_characters(data['username'], "!!@#¥$%^&*_-+/——=()()【】}|{:;<>~`\\")

# 违禁处理
if self.prohibitions_handle(data['username']):
Expand Down Expand Up @@ -1038,6 +1040,8 @@ def entrance_handle(self, data):

# 合并字符串末尾连续的* 主要针对获取不到用户名的情况
data['username'] = My_handle.common.merge_consecutive_asterisks(data['username'])
# 删除用户名中的特殊字符
data['username'] = My_handle.common.replace_special_characters(data['username'], "!!@#¥$%^&*_-+/——=()()【】}|{:;<>~`\\")

# 违禁处理
if self.prohibitions_handle(data['username']):
Expand Down

0 comments on commit cacac99

Please sign in to comment.