Fix casing of 'URL' (#9080)
This commit is contained in:
@@ -106,7 +106,7 @@ namespace Umbraco.Core
|
||||
/// </remarks>
|
||||
internal static Attempt<string> DetectIsJavaScriptPath(this string input)
|
||||
{
|
||||
//validate that this is a url, if it is not, we'll assume that it is a text block and render it as a text
|
||||
//validate that this is a URL, if it is not, we'll assume that it is a text block and render it as a text
|
||||
//block instead.
|
||||
var isValid = true;
|
||||
|
||||
@@ -114,7 +114,7 @@ namespace Umbraco.Core
|
||||
{
|
||||
//ok it validates, but so does alert('hello'); ! so we need to do more checks
|
||||
|
||||
//here are the valid chars in a url without escaping
|
||||
//here are the valid chars in a URL without escaping
|
||||
if (Regex.IsMatch(input, @"[^a-zA-Z0-9-._~:/?#\[\]@!$&'\(\)*\+,%;=]"))
|
||||
isValid = false;
|
||||
|
||||
@@ -856,7 +856,7 @@ namespace Umbraco.Core
|
||||
var pos = str.IndexOf('=');
|
||||
if (pos < 0) pos = str.Length;
|
||||
|
||||
// replace chars that would cause problems in urls
|
||||
// replace chars that would cause problems in URLs
|
||||
var chArray = new char[pos];
|
||||
for (var i = 0; i < pos; i++)
|
||||
{
|
||||
@@ -1095,13 +1095,13 @@ namespace Umbraco.Core
|
||||
return Current.ShortStringHelper.CleanStringForSafeAlias(alias, culture);
|
||||
}
|
||||
|
||||
// the new methods to get a url segment
|
||||
// the new methods to get a URL segment
|
||||
|
||||
/// <summary>
|
||||
/// Cleans a string to produce a string that can safely be used in an url segment.
|
||||
/// Cleans a string to produce a string that can safely be used in an URL segment.
|
||||
/// </summary>
|
||||
/// <param name="text">The text to filter.</param>
|
||||
/// <returns>The safe url segment.</returns>
|
||||
/// <returns>The safe URL segment.</returns>
|
||||
public static string ToUrlSegment(this string text)
|
||||
{
|
||||
if (text == null) throw new ArgumentNullException(nameof(text));
|
||||
@@ -1111,11 +1111,11 @@ namespace Umbraco.Core
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cleans a string, in the context of a specified culture, to produce a string that can safely be used in an url segment.
|
||||
/// Cleans a string, in the context of a specified culture, to produce a string that can safely be used in an URL segment.
|
||||
/// </summary>
|
||||
/// <param name="text">The text to filter.</param>
|
||||
/// <param name="culture">The culture.</param>
|
||||
/// <returns>The safe url segment.</returns>
|
||||
/// <returns>The safe URL segment.</returns>
|
||||
public static string ToUrlSegment(this string text, string culture)
|
||||
{
|
||||
if (text == null) throw new ArgumentNullException(nameof(text));
|
||||
@@ -1124,7 +1124,7 @@ namespace Umbraco.Core
|
||||
return Current.ShortStringHelper.CleanStringForUrlSegment(text, culture);
|
||||
}
|
||||
|
||||
// the new methods to clean a string (to alias, url segment...)
|
||||
// the new methods to clean a string (to alias, URL segment...)
|
||||
|
||||
/// <summary>
|
||||
/// Cleans a string.
|
||||
@@ -1205,7 +1205,7 @@ namespace Umbraco.Core
|
||||
|
||||
/// <summary>
|
||||
/// Cleans a string, in the context of the invariant culture, to produce a string that can safely be used as a filename,
|
||||
/// both internally (on disk) and externally (as a url).
|
||||
/// both internally (on disk) and externally (as a URL).
|
||||
/// </summary>
|
||||
/// <param name="text">The text to filter.</param>
|
||||
/// <returns>The safe filename.</returns>
|
||||
@@ -1216,7 +1216,7 @@ namespace Umbraco.Core
|
||||
|
||||
/// <summary>
|
||||
/// Cleans a string, in the context of the invariant culture, to produce a string that can safely be used as a filename,
|
||||
/// both internally (on disk) and externally (as a url).
|
||||
/// both internally (on disk) and externally (as a URL).
|
||||
/// </summary>
|
||||
/// <param name="text">The text to filter.</param>
|
||||
/// <param name="culture">The culture.</param>
|
||||
|
||||
Reference in New Issue
Block a user