Corrected internal exception when a Page content is empty

--HG--
branch : dev
This commit is contained in:
Sebastien Ros
2010-05-19 10:29:55 -07:00
parent 0ee8910417
commit 559a94af73

View File

@@ -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\]");