From d6f52e0de32936245509494b89ca8b83fde46c7d Mon Sep 17 00:00:00 2001 From: inga-lovinde <52715130+inga-lovinde@users.noreply.github.com> Date: Sat, 18 Sep 2010 22:50:17 +0000 Subject: [PATCH] URL processing in UBBCode improved --- Builder/IISMainHandler/build.txt | 2 +- Common/BBCodes/helpers/UrlProcessor.cs | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Builder/IISMainHandler/build.txt b/Builder/IISMainHandler/build.txt index 473aa3c..e7814ff 100644 --- a/Builder/IISMainHandler/build.txt +++ b/Builder/IISMainHandler/build.txt @@ -1 +1 @@ -1413 \ No newline at end of file +1415 \ No newline at end of file diff --git a/Common/BBCodes/helpers/UrlProcessor.cs b/Common/BBCodes/helpers/UrlProcessor.cs index 874d518..3c98e0c 100644 --- a/Common/BBCodes/helpers/UrlProcessor.cs +++ b/Common/BBCodes/helpers/UrlProcessor.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Web; +using FLocal.Core; namespace FLocal.Common.BBCodes { class UrlProcessor { @@ -74,6 +75,9 @@ namespace FLocal.Common.BBCodes { } } else { var linkInfo = URL.UrlManager.Parse(url, new System.Collections.Specialized.NameValueCollection(), true); + if(linkInfo == null) { + throw new FLocalException("Unable to parse link: " + url); + } url = linkInfo.canonicalFull; if(title == null) { title = linkInfo.title;