|
@@ -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);
|