This commit is contained in:
Hamid Reza Mohammadi 2025-03-24 11:59:27 +03:30
parent def19f06b4
commit 287213fef8

View File

@ -47,14 +47,7 @@ namespace RMuseum.Utils
string textWithoutTags = Regex.Replace(input, "<.*?>", string.Empty);
// Decode HTML entities (e.g., &amp; → &)
textWithoutTags = HttpUtility.HtmlDecode(textWithoutTags);
//it seems some codes are not correctly converted:
textWithoutTags = textWithoutTags.Replace("&zwnj;", "‌");
textWithoutTags = textWithoutTags.Replace("&laquo;", "»");
textWithoutTags = textWithoutTags.Replace("&raquo;", "«");
return textWithoutTags;
return HttpUtility.HtmlDecode(textWithoutTags);
}
}
}