diff --git a/src/main/java/com/nis/web/controller/BaseController.java b/src/main/java/com/nis/web/controller/BaseController.java index e6c3f921c..b1e207611 100644 --- a/src/main/java/com/nis/web/controller/BaseController.java +++ b/src/main/java/com/nis/web/controller/BaseController.java @@ -902,7 +902,7 @@ public class BaseController { } } if (!has) { - if(keyword.split("\n").length>4) { + if(keyword.replaceAll("\n","").length()>1024) { errInfo.append(String.format(prop.getProperty("most_keywords"), prop.getProperty("key_word")) + ";"); }else { @@ -1147,7 +1147,7 @@ public class BaseController { } } if (!has) { - if(keyword.split("\n").length>4) { + if(keyword.replaceAll("\n","").length()>1024) { errInfo.append(String.format(prop.getProperty("most_keywords"), prop.getProperty("key_word")) + ";"); }else { diff --git a/src/main/resources/messages/message_en.properties b/src/main/resources/messages/message_en.properties index a20905bef..0c08416b8 100644 --- a/src/main/resources/messages/message_en.properties +++ b/src/main/resources/messages/message_en.properties @@ -1299,4 +1299,4 @@ av_protocol_note=Note:Recognizable Protocols Include RTSP,RTMP. ip_range_in_the_same=Start IP and end IP in a IP range must with in the same subnet log_to_url=To HTTP URL source_compile_id=Configuration Source -most_keywords=%s can have four keywords at most \ No newline at end of file +most_keywords=%s can have 1024 chars at most \ No newline at end of file diff --git a/src/main/resources/messages/message_ru.properties b/src/main/resources/messages/message_ru.properties index 17647abf6..61da343da 100644 --- a/src/main/resources/messages/message_ru.properties +++ b/src/main/resources/messages/message_ru.properties @@ -1297,4 +1297,4 @@ av_protocol_note=Note:Recognizable Protocols Include RTSP,RTMP. log_to_url=To HTTP URL source_compile_id=Configuration Source av_protocol_note=Note:Recognizable Protocols Include RTSP,RTMP. -most_keywords=%s can have four keywords at most \ No newline at end of file +most_keywords=%s can have 1024 chars at most \ No newline at end of file diff --git a/src/main/resources/messages/message_zh_CN.properties b/src/main/resources/messages/message_zh_CN.properties index 13112e527..3a9737348 100644 --- a/src/main/resources/messages/message_zh_CN.properties +++ b/src/main/resources/messages/message_zh_CN.properties @@ -1291,4 +1291,4 @@ av_protocol_note=\u6CE8\uFF1A\u53EF\u8BC6\u522B\u534F\u8BAE\u5305\u62EC RTSP\u30 ip_range_in_the_same=IP\u8303\u56F4\u7684\u8D77\u59CBIP\u4E0E\u7EC8\u6B62IP\u5FC5\u987B\u5728\u76F8\u540C\u7F51\u6BB5 log_to_url=\u8F6CHTTP URL\u914D\u7F6E source_compile_id=\u914D\u7F6E\u6765\u6E90 -most_keywords=%s\u6700\u591A\u5305\u542B\u56DB\u4E2A\u5173\u952E\u8BCD \ No newline at end of file +most_keywords=%s\u6700\u591A\u5305\u542B1024\u4E2A\u5B57\u7B26 \ No newline at end of file