Fixes U4-2618 PDF indexer does not ensure spaces are added to textual content and fixes med trust compat relating to U4-2180 Problem with Examine MultiIndexSearcher after upgrading from 4.11.3 to 4.11.8

This commit is contained in:
Shannon
2013-08-13 13:47:57 +10:00
parent c52c452b36
commit aa1c411c8c
5 changed files with 76 additions and 49 deletions

View File

@@ -28,6 +28,16 @@ namespace Umbraco.Core
[UmbracoWillObsolete("Do not use this constants. See IShortStringHelper.CleanStringForSafeAliasJavaScriptCode.")]
public const string UmbracoInvalidFirstCharacters = "01234567890";
public static string ExceptChars(this string str, HashSet<char> toExclude)
{
var sb = new StringBuilder(str.Length);
foreach (var c in str.Where(c => toExclude.Contains(c) == false))
{
sb.Append(c);
}
return sb.ToString();
}
/// <summary>
/// Encrypt the string using the MachineKey in medium trust
/// </summary>