xf 3 ماه پیش
والد
کامیت
f335b380c9
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      src/Hotline.Application/Tools/StringExtensions.cs

+ 1 - 1
src/Hotline.Application/Tools/StringExtensions.cs

@@ -31,7 +31,7 @@ public static class StringExtensions
 
         //去除html标签
         var sb = new StringBuilder();
-        while (content.StartsWith('<') || content.EndsWith('>'))
+        while (!string.IsNullOrEmpty(content) && (content.StartsWith('<') || content.EndsWith('>')))
         {
             var indexright = content.IndexOf('>');
             var indexSecLeft = content.IndexOf('<', indexright);