From e2cad3d3d72b4771dadf37f6696693eeff91521e Mon Sep 17 00:00:00 2001 From: Sebastien Ros Date: Thu, 9 Aug 2012 18:15:24 -0700 Subject: [PATCH] Removing dead code in Bbcode filter --HG-- branch : 1.x --- .../Core/Common/Services/BbcodeFilter.cs | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/src/Orchard.Web/Core/Common/Services/BbcodeFilter.cs b/src/Orchard.Web/Core/Common/Services/BbcodeFilter.cs index a58753b51..4ec096980 100644 --- a/src/Orchard.Web/Core/Common/Services/BbcodeFilter.cs +++ b/src/Orchard.Web/Core/Common/Services/BbcodeFilter.cs @@ -1,8 +1,6 @@ using System; using System.Collections.Generic; -using System.Linq; using System.Text; -using System.Text.RegularExpressions; using System.Web; using Orchard.Services; @@ -83,30 +81,6 @@ namespace Orchard.Core.Common.Services { sb.Insert(start, String.Format("", url)); } - //var urlRegex = new Regex(@"\[url\]([^\]]+)\[\/url\]"); - //var urlRegexWithLink = new Regex(@"\[url=([^\]]+)\]([^\]]+)\[\/url\]"); - //var imgRegex = new Regex(@"\[img\]([^\]]+)\[\/img\]"); - - //text = urlRegex.Replace(text, "$1"); - //text = urlRegexWithLink.Replace(text, "$2"); - - //var matches = imgRegex.Matches(text).OfType().OrderByDescending(m => m.Groups[0].Index); - //foreach(var match in matches) { - // var index2 = match.Groups[0].Index; - // var length = match.Groups[0].Length; - // var url = match.Groups[1].Value.Trim(); - // if (!string.IsNullOrEmpty(url)) { - // if (url[0]=='~') - // url = VirtualPathUtility.ToAbsolute(url); - // text = - // text.Substring(0, index2) + - // string.Format("", url) + - // text.Substring(index2 + length); - // } - //} - - //text = imgRegex.Replace(text, ""); - return sb.ToString(); } }