aboutsummaryrefslogtreecommitdiffstats
path: root/tests/safe_mode
diff options
context:
space:
mode:
Diffstat (limited to 'tests/safe_mode')
-rw-r--r--tests/safe_mode/inline-html-advanced.html13
-rw-r--r--tests/safe_mode/inline-html-comments.html20
-rw-r--r--tests/safe_mode/inline-html-simple.html97
-rw-r--r--tests/safe_mode/script_tags.html34
-rw-r--r--tests/safe_mode/unsafe_urls.html45
5 files changed, 93 insertions, 116 deletions
diff --git a/tests/safe_mode/inline-html-advanced.html b/tests/safe_mode/inline-html-advanced.html
index bc59ab1..e9dd2ec 100644
--- a/tests/safe_mode/inline-html-advanced.html
+++ b/tests/safe_mode/inline-html-advanced.html
@@ -1,14 +1,11 @@
-<p>Simple block on one line:
-</p>
-&lt;div&gt;foo&lt;/div&gt;
-
-<p>And nested without indentation:
-</p>
-&lt;div&gt;
+<p>Simple block on one line:</p>
+<p>&lt;div&gt;foo&lt;/div&gt;</p>
+<p>And nested without indentation:</p>
+<p>&lt;div&gt;
&lt;div&gt;
&lt;div&gt;
foo
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;bar&lt;/div&gt;
-&lt;/div&gt; \ No newline at end of file
+&lt;/div&gt;</p> \ No newline at end of file
diff --git a/tests/safe_mode/inline-html-comments.html b/tests/safe_mode/inline-html-comments.html
index 8deccba..0f1e417 100644
--- a/tests/safe_mode/inline-html-comments.html
+++ b/tests/safe_mode/inline-html-comments.html
@@ -1,14 +1,8 @@
-<p>Paragraph one.
-</p>
-&lt;!-- This is a simple comment --&gt;
-
-&lt;!--
+<p>Paragraph one.</p>
+<p>&lt;!-- This is a simple comment --&gt;</p>
+<p>&lt;!--
This is another comment.
---&gt;
-
-<p>Paragraph two.
-</p>
-&lt;!-- one comment block -- -- with two comments --&gt;
-
-<p>The end.
-</p> \ No newline at end of file
+--&gt;</p>
+<p>Paragraph two.</p>
+<p>&lt;!-- one comment block -- -- with two comments --&gt;</p>
+<p>The end.</p> \ No newline at end of file
diff --git a/tests/safe_mode/inline-html-simple.html b/tests/safe_mode/inline-html-simple.html
index 24d16ba..ceaaa90 100644
--- a/tests/safe_mode/inline-html-simple.html
+++ b/tests/safe_mode/inline-html-simple.html
@@ -1,64 +1,53 @@
-<p>Here's a simple block:
-</p>
-&lt;div&gt;
+<p>Here's a simple block:</p>
+<p>&lt;div&gt;
foo
-&lt;/div&gt;
-
-<p>This should be a code block, though:
-</p>
-<pre><code>&lt;div&gt;
+&lt;/div&gt;</p>
+<p>This should be a code block, though:</p>
+<pre>
+<code>&lt;div&gt;
foo
&lt;/div&gt;
-</code></pre><p>As should this:
-</p>
-<pre><code>&lt;div&gt;foo&lt;/div&gt;
-</code></pre><p>Now, nested:
-</p>
-&lt;div&gt;
+</code>
+</pre>
+<p>As should this:</p>
+<pre>
+<code>&lt;div&gt;foo&lt;/div&gt;
+</code>
+</pre>
+<p>Now, nested:</p>
+<p>&lt;div&gt;
&lt;div&gt;
&lt;div&gt;
foo
&lt;/div&gt;
&lt;/div&gt;
-&lt;/div&gt;
-
-<p>This should just be an HTML comment:
-</p>
-&lt;!-- Comment --&gt;
-
-<p>Multiline:
-</p>
-&lt;!--
+&lt;/div&gt;</p>
+<p>This should just be an HTML comment:</p>
+<p>&lt;!-- Comment --&gt;</p>
+<p>Multiline:</p>
+<p>&lt;!--
Blah
Blah
---&gt;
-
-<p>Code block:
-</p>
-<pre><code>&lt;!-- Comment --&gt;
-</code></pre><p>Just plain comment, with trailing spaces on the line:
-</p>
-&lt;!-- foo --&gt;
-
-<p>Code:
-</p>
-<pre><code>&lt;hr /&gt;
-</code></pre><p>Hr's:
-</p>
-&lt;hr&gt;
-
-&lt;hr/&gt;
-
-&lt;hr /&gt;
-
-&lt;hr&gt;
-
-&lt;hr/&gt;
-
-&lt;hr /&gt;
-
-&lt;hr class=&quot;foo&quot; id=&quot;bar&quot; /&gt;
-
-&lt;hr class=&quot;foo&quot; id=&quot;bar&quot;/&gt;
-
-&lt;hr class=&quot;foo&quot; id=&quot;bar&quot; &gt; \ No newline at end of file
+--&gt;</p>
+<p>Code block:</p>
+<pre>
+<code>&lt;!-- Comment --&gt;
+</code>
+</pre>
+<p>Just plain comment, with trailing spaces on the line:</p>
+<p>&lt;!-- foo --&gt;</p>
+<p>Code:</p>
+<pre>
+<code>&lt;hr /&gt;
+</code>
+</pre>
+<p>Hr's:</p>
+<p>&lt;hr&gt;</p>
+<p>&lt;hr/&gt;</p>
+<p>&lt;hr /&gt;</p>
+<p>&lt;hr&gt;</p>
+<p>&lt;hr/&gt;</p>
+<p>&lt;hr /&gt;</p>
+<p>&lt;hr class=&quot;foo&quot; id=&quot;bar&quot; /&gt;</p>
+<p>&lt;hr class=&quot;foo&quot; id=&quot;bar&quot;/&gt;</p>
+<p>&lt;hr class=&quot;foo&quot; id=&quot;bar&quot; &gt;</p> \ No newline at end of file
diff --git a/tests/safe_mode/script_tags.html b/tests/safe_mode/script_tags.html
index cb2abfa..4c669dd 100644
--- a/tests/safe_mode/script_tags.html
+++ b/tests/safe_mode/script_tags.html
@@ -1,26 +1,20 @@
-<p>This should be stripped/escaped in safe_mode.
-</p>
-&lt;script&gt;
+<p>This should be stripped/escaped in safe_mode.</p>
+<p>&lt;script&gt;
alert(&quot;Hello world!&quot;)
-&lt;/script&gt;
-
-<p>With blank lines.
-</p>
-&lt;script&gt;
+&lt;/script&gt;</p>
+<p>With blank lines.</p>
+<p>&lt;script&gt;
alert(&quot;Hello world!&quot;)
-&lt;/script&gt;
-
-<p>Now with some weirdness
-</p>
-<p><code>&lt;script &lt;!--
+&lt;/script&gt;</p>
+<p>Now with some weirdness</p>
+<p>
+<code>&lt;script &lt;!--
alert("Hello world!")
-&lt;/script &lt;&gt;</code>`
-</p>
-<p>Try another way.
-</p>
-&lt;script &lt;!--
+&lt;/script &lt;&gt;</code>`</p>
+<p>Try another way.</p>
+<p>&lt;script &lt;!--
alert(&quot;Hello world!&quot;)
&lt;/script &lt;&gt;
@@ -30,4 +24,6 @@ This time with blank lines.
alert(&quot;Hello world!&quot;)
-&lt;/script &lt;&gt; \ No newline at end of file
+&lt;/script &lt;&gt;
+
+</p> \ No newline at end of file
diff --git a/tests/safe_mode/unsafe_urls.html b/tests/safe_mode/unsafe_urls.html
index fe37840..6dabe64 100644
--- a/tests/safe_mode/unsafe_urls.html
+++ b/tests/safe_mode/unsafe_urls.html
@@ -1,25 +1,26 @@
-<p>These links should be unsafe and not allowed in safe_mode
+<p>These links should be unsafe and not allowed in safe_mode</p>
+<p>
+<a href="">link</a>
+<a href="">link</a>
+<a href="">link</a>
+<a href="">link</a>
+<a href="">link</a>
+<a href="">link</a>
+<a href="">link</a>
+<a href="">link</a>
+<a href="">link</a>
+<a href="">link</a>
+<a href="">link</a>
</p>
-<p><a href="">link</a>
- <a href="">link</a>
- <a href="">link</a>
- <a href="">link</a>
- <a href="">link</a>
- <a href="">link</a>
- <a href="">link</a>
- <a href="">link</a>
- <a href="">link</a>
- <a href="">link</a>
- <a href="">link</a>
+<p>
+<img alt="img" src="" />
+<a href="">ref</a>
+<img alt="imgref" src="" />
</p>
-<p><img src="" alt="img"/>
- <a href="">ref</a>
- <img src="" alt="imgref"/>
-</p>
-<p>These should work regardless:
-</p>
-<p><a href="relative/url.html">relative</a>
- <a href="mailto:foo@bar.com">email</a>
- <a href="news:some.news.group.com">news scheme</a>
- <a href="http://example.com">http link</a>
+<p>These should work regardless:</p>
+<p>
+<a href="relative/url.html">relative</a>
+<a href="mailto:foo@bar.com">email</a>
+<a href="news:some.news.group.com">news scheme</a>
+<a href="http://example.com">http link</a>
</p>