diff --git a/src/Umbraco.Tests/HtmlHelperExtensionMethodsTests.cs b/src/Umbraco.Tests/HtmlHelperExtensionMethodsTests.cs
new file mode 100644
index 0000000000..5efabd891e
--- /dev/null
+++ b/src/Umbraco.Tests/HtmlHelperExtensionMethodsTests.cs
@@ -0,0 +1,33 @@
+using System.Web.Mvc;
+using NUnit.Framework;
+using Umbraco.Web;
+
+namespace Umbraco.Tests
+{
+ [TestFixture]
+ public class HtmlHelperExtensionMethodsTests
+ {
+ [SetUp]
+ public virtual void Initialize()
+ {
+ //create an empty htmlHelper
+ _htmlHelper = new HtmlHelper(new ViewContext(), new ViewPage());
+ }
+
+ private HtmlHelper _htmlHelper;
+
+ [Test]
+ public void Wrap_Simple()
+ {
+ var output = _htmlHelper.Wrap("div", "hello world");
+ Assert.AreEqual("
hello world
", output.ToHtmlString());
+ }
+
+ [Test]
+ public void Wrap_Object_Attributes()
+ {
+ var output = _htmlHelper.Wrap("div", "hello world", new {style = "color:red;", onclick = "void();"});
+ Assert.AreEqual("hello world
", output.ToHtmlString());
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Umbraco.Tests/StringExtensionsTests.cs b/src/Umbraco.Tests/StringExtensionsTests.cs
index 73e828ac73..49f8f830d7 100644
--- a/src/Umbraco.Tests/StringExtensionsTests.cs
+++ b/src/Umbraco.Tests/StringExtensionsTests.cs
@@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Security;
using System.Text;
-using System.Web.Mvc;
using NUnit.Framework;
using Umbraco.Core;
diff --git a/src/Umbraco.Tests/Umbraco.Tests.csproj b/src/Umbraco.Tests/Umbraco.Tests.csproj
index 2d5c4776d1..b924753e6c 100644
--- a/src/Umbraco.Tests/Umbraco.Tests.csproj
+++ b/src/Umbraco.Tests/Umbraco.Tests.csproj
@@ -55,6 +55,7 @@
+
diff --git a/src/Umbraco.Web.UI/Web.config b/src/Umbraco.Web.UI/Web.config
index 3dd62de184..a860662208 100644
--- a/src/Umbraco.Web.UI/Web.config
+++ b/src/Umbraco.Web.UI/Web.config
@@ -36,7 +36,7 @@
-
+
diff --git a/src/Umbraco.Web/HtmlHelperRenderExtensions.cs b/src/Umbraco.Web/HtmlHelperRenderExtensions.cs
index e91f754140..f353a07214 100644
--- a/src/Umbraco.Web/HtmlHelperRenderExtensions.cs
+++ b/src/Umbraco.Web/HtmlHelperRenderExtensions.cs
@@ -6,6 +6,7 @@ using System.Text;
using System.Web.Mvc;
using System.Web.Mvc.Html;
using Umbraco.Core;
+using Umbraco.Core.Dynamics;
using Umbraco.Web.Mvc;
using umbraco;
@@ -16,59 +17,6 @@ namespace Umbraco.Web
///
public static class HtmlHelperRenderExtensions
{
- ///
- /// Used for rendering out the Form for BeginUmbracoForm
- ///
- internal class UmbracoForm : MvcForm
- {
- ///
- /// Creates an UmbracoForm
- ///
- ///
- ///
- ///
- ///
- ///
- public UmbracoForm(
- ViewContext viewContext,
- string surfaceController,
- string surfaceAction,
- string area,
- object additionalRouteVals = null)
- : base(viewContext)
- {
- //need to create a params string as Base64 to put into our hidden field to use during the routes
- var surfaceRouteParams = string.Format("c={0}&a={1}&ar={2}",
- viewContext.HttpContext.Server.UrlEncode(surfaceController),
- viewContext.HttpContext.Server.UrlEncode(surfaceAction),
- area);
-
- var additionalRouteValsAsQuery = additionalRouteVals.ToDictionary