diff --git a/test/Htmxor.TestApp/Components/Pages/Home.razor b/test/Htmxor.TestApp/Components/Pages/Home.razor index a1065ab..14b8840 100644 --- a/test/Htmxor.TestApp/Components/Pages/Home.razor +++ b/test/Htmxor.TestApp/Components/Pages/Home.razor @@ -133,5 +133,14 @@ Htmxor. Redirect using Nav Man + + hx-vals-escaped + + + hx-on + + + hx-headers-escaped + \ No newline at end of file diff --git a/test/Htmxor.TestApp/Components/Pages/HxHeaders.razor b/test/Htmxor.TestApp/Components/Pages/HxHeaders.razor new file mode 100644 index 0000000..97cf077 --- /dev/null +++ b/test/Htmxor.TestApp/Components/Pages/HxHeaders.razor @@ -0,0 +1,2 @@ +@page "/hx-headers-escaped" + \ No newline at end of file diff --git a/test/Htmxor.TestApp/Components/Pages/HxOn.razor b/test/Htmxor.TestApp/Components/Pages/HxOn.razor new file mode 100644 index 0000000..cc02741 --- /dev/null +++ b/test/Htmxor.TestApp/Components/Pages/HxOn.razor @@ -0,0 +1,26 @@ +@page "/hx-on" +
Click
+ + + + + + + + + + + + diff --git a/test/Htmxor.TestApp/Components/Pages/HxVals.razor b/test/Htmxor.TestApp/Components/Pages/HxVals.razor new file mode 100644 index 0000000..f061980 --- /dev/null +++ b/test/Htmxor.TestApp/Components/Pages/HxVals.razor @@ -0,0 +1,6 @@ +@page "/hx-vals-escaped" + \ No newline at end of file diff --git a/test/Htmxor.Tests/DemoTestCases/HxValsTest.cs b/test/Htmxor.Tests/DemoTestCases/HxValsTest.cs new file mode 100644 index 0000000..bc1bdfe --- /dev/null +++ b/test/Htmxor.Tests/DemoTestCases/HxValsTest.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading.Tasks; + +namespace Htmxor.DemoTestCases; + +public class HxValsTest : TestAppTestBase +{ + public HxValsTest(TestAppFixture fixture) : base(fixture) + { + } + + [Fact] + public async Task HxVals_correctly_escaped_by_renderer() + { + await Host.Scenario(s => + { + s.Get.Url("/hx-vals-escaped"); + + s.StatusCodeShouldBe(HttpStatusCode.OK); + s.ContentShouldBeHtml(FullPageContent($$""" + + """)); + }); + } +}