]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/html/parser/parser-tests.factor
html.parser: Strip trailing slashes / in html tags. Add unit test. Fixes #1233.
[factor.git] / extra / html / parser / parser-tests.factor
index 2876d03b163205ebf0dce8f95997ecd9cd5544a2..9607712bab3e9efa66e18af8b977ae9248d08df5 100644 (file)
@@ -96,3 +96,34 @@ V{
 ] [
     "<!--comment-->" parse-html
 ] unit-test
+
+! Issue #1233, trailing / in tags
+{
+    V{
+        T{ tag
+            { name "img" }
+            { attributes H{ { "src" "http://factorcode.org" } } }
+        }
+    }
+}
+[ "<img src=\"http://factorcode.org\">" parse-html ] unit-test
+
+{
+    V{
+        T{ tag
+            { name "img" }
+            { attributes H{ { "src" "http://factorcode.org" } } }
+        }
+    }
+}
+[ "<img src=\"http://factorcode.org\"/>" parse-html ] unit-test
+
+{
+    V{
+        T{ tag
+            { name "img" }
+            { attributes H{ { "src" "http://factorcode.org" } } }
+        }
+    }
+}
+[ "<img src=\"http://factorcode.org\"////////>" parse-html ] unit-test