From 8d7c114b40b43b177db5dd59b0be0f8e91bfcdf8 Mon Sep 17 00:00:00 2001 From: chenjing <28122123@qq.com> Date: Mon, 25 Sep 2023 11:40:11 +0800 Subject: [PATCH] update check keywords --- app/controllers/accounts_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb index b6ac9987d..be91d8527 100644 --- a/app/controllers/accounts_controller.rb +++ b/app/controllers/accounts_controller.rb @@ -361,7 +361,7 @@ class AccountsController < ApplicationController end def check_keywords - text = params[:text]&.gsub(/\s+/, "") + text = params[:text].to_s.each_char.select { |c| c.bytes.first < 240 }.join('') tip_exception("无法使用以下关键词:#{text},请重新命名") if ReversedKeyword.check_exists?(text) render_ok end