mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 19:04:51 +08:00
Corrected internal exception when a Page content is empty
--HG-- branch : dev
This commit is contained in:
@@ -104,6 +104,10 @@ namespace Orchard.Core.Common.Drivers {
|
||||
|
||||
// Can be moved somewhere else once we have IoC enabled body text filters.
|
||||
private static string BbcodeReplace(string bodyText) {
|
||||
|
||||
if ( string.IsNullOrEmpty(bodyText) )
|
||||
return string.Empty;
|
||||
|
||||
Regex urlRegex = new Regex(@"\[url\]([^\]]+)\[\/url\]");
|
||||
Regex urlRegexWithLink = new Regex(@"\[url=([^\]]+)\]([^\]]+)\[\/url\]");
|
||||
Regex imgRegex = new Regex(@"\[img\]([^\]]+)\[\/img\]");
|
||||
|
Reference in New Issue
Block a user