For the test:
diff --git a/Tests/LibWeb/Text/data/ismap-img-with-link-to-self-sending-url.html b/Tests/LibWeb/Text/data/ismap-img-with-link-to-self-sending-url.html
new file mode 100644
index 0000000000..20d853a812
--- /dev/null
+++ b/Tests/LibWeb/Text/data/ismap-img-with-link-to-self-sending-url.html
@@ -0,0 +1,8 @@
+<a href="ismap-img-with-link-to-self-sending-url.html">
+ <img width="350" height="250" ismap />
+</a>
+<script>
+ window.onload = () => {
+ window.parent.postMessage(window.location.href, "*");
+ };
+</script>
diff --git a/Tests/LibWeb/Text/expected/navigation/ismap-img-sends-query-string-from-link.txt b/Tests/LibWeb/Text/expected/navigation/ismap-img-sends-query-string-from-link.txt
new file mode 100644
index 0000000000..98ce94303f
--- /dev/null
+++ b/Tests/LibWeb/Text/expected/navigation/ismap-img-sends-query-string-from-link.txt
@@ -0,0 +1,2 @@
+ Search query from iframe: #1 = ''
+Search query from iframe: #2 = '?32,32'
diff --git a/Tests/LibWeb/Text/input/navigation/ismap-img-sends-query-string-from-link.html b/Tests/LibWeb/Text/input/navigation/ismap-img-sends-query-string-from-link.html
new file mode 100644
index 0000000000..e07a17ceaf
--- /dev/null
+++ b/Tests/LibWeb/Text/input/navigation/ismap-img-sends-query-string-from-link.html
@@ -0,0 +1,26 @@
+<script src="../include.js"></script>
+<script>
+ asyncTest(async done => {
+ const iframe = document.getElementById("testIframe");
+
+ let count = 0;
+ function handleMessage(event) {
+ ++count;
+ println(`Search query from iframe: #${count} = '${new URL(event.data).search}'`);
+ if (count === 1) {
+ internals.click(50, 50);
+ } else if (count === 2) {
+ done();
+ }
+ }
+
+ window.addEventListener("message", handleMessage);
+ });
+</script>
+<iframe
+ id="testIframe"
+ src="../../data/ismap-img-with-link-to-self-sending-url.html"
+ width="400"
+ height="300"
+>
+</iframe>
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too