mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +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.
|
// Can be moved somewhere else once we have IoC enabled body text filters.
|
||||||
private static string BbcodeReplace(string bodyText) {
|
private static string BbcodeReplace(string bodyText) {
|
||||||
|
|
||||||
|
if ( string.IsNullOrEmpty(bodyText) )
|
||||||
|
return string.Empty;
|
||||||
|
|
||||||
Regex urlRegex = new Regex(@"\[url\]([^\]]+)\[\/url\]");
|
Regex urlRegex = new Regex(@"\[url\]([^\]]+)\[\/url\]");
|
||||||
Regex urlRegexWithLink = new Regex(@"\[url=([^\]]+)\]([^\]]+)\[\/url\]");
|
Regex urlRegexWithLink = new Regex(@"\[url=([^\]]+)\]([^\]]+)\[\/url\]");
|
||||||
Regex imgRegex = new Regex(@"\[img\]([^\]]+)\[\/img\]");
|
Regex imgRegex = new Regex(@"\[img\]([^\]]+)\[\/img\]");
|
||||||
|
Reference in New Issue
Block a user