aboutsummaryrefslogtreecommitdiff
path: root/test/writer.dokuwiki
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2024-09-21 16:58:01 -0700
committerJohn MacFarlane <[email protected]>2024-09-21 16:58:01 -0700
commit16a9df8c6be275d78984d854524dca0531d533aa (patch)
tree51a8d449710d51817ae06fbf83b5be67983f2a9f /test/writer.dokuwiki
parent8aa796f30ad4e434c948f3961c59f98e8a58270b (diff)
DokuWiki writer: don't emit `<HTML>` tags.
The use of these tags is now strongly discouraged for security reasons, and will be removed. We previously used them as a fallback for lists that could not be represented using DokuWiki syntax, e.g. ordered lists with fancy numbers or lists with multiple blocks in their items. We also used them for block quotes with multiple blocks as their contents. We now use the `<WRAP>` syntax (from the optional WRAP plugin) to handle lists with multiple blocks as their contents. A new method of handling block quotes with complex contents has the side benefit of also handling nested block quotes, which weren't supported before. `<HTML>` and `<html>` tags are only for raw HTML blocks and inlines, and only if the `raw_html` extension is enabled. (It is now a valid extension for `dokuwiki`, though off by default.) Closes #7413.
Diffstat (limited to 'test/writer.dokuwiki')
-rw-r--r--test/writer.dokuwiki148
1 files changed, 55 insertions, 93 deletions
diff --git a/test/writer.dokuwiki b/test/writer.dokuwiki
index bb47524f3..57f1bf19f 100644
--- a/test/writer.dokuwiki
+++ b/test/writer.dokuwiki
@@ -48,26 +48,25 @@ E-mail style:
> This is a block quote. It is pretty short.
-<HTML><blockquote>
-Code in a block quote:
+> Code in a block quote:
-<code>
+> <code>
sub status {
print "working";
}
</code>
-A list:
+> A list:
+
+> - item one
+> - item two
- - item one
- - item two
+> Nested block quotes:
-Nested block quotes:
+>> nested
-> nested
+>> nested
-> nested
-</blockquote></HTML>
This should not be a block quote: 2 > 1.
And a following paragraph.
@@ -168,11 +167,12 @@ and using spaces:
Multiple paragraphs:
-<HTML><ol style="list-style-type: decimal;"></HTML>
-<HTML><li></HTML><HTML><p></HTML>Item 1, graf one.<HTML></p></HTML>
-<HTML><p></HTML>Item 1. graf two. The quick brown fox jumped over the lazy dog’s back.<HTML></p></HTML><HTML></li></HTML>
-<HTML><li></HTML><HTML><p></HTML>Item 2.<HTML></p></HTML><HTML></li></HTML>
-<HTML><li></HTML><HTML><p></HTML>Item 3.<HTML></p></HTML><HTML></li></HTML><HTML></ol></HTML>
+ - <WRAP>
+Item 1, graf one.
+Item 1. graf two. The quick brown fox jumped over the lazy dog’s back.
+</WRAP>
+ - Item 2.
+ - Item 3.
===== Nested =====
@@ -207,32 +207,28 @@ Same thing but with paragraphs:
===== Fancy list markers =====
-<HTML><ol start="2" style="list-style-type: decimal;"></HTML>
-<HTML><li></HTML><HTML><p></HTML>begins with 2<HTML></p></HTML><HTML></li></HTML>
-<HTML><li></HTML><HTML><p></HTML>and now 3<HTML></p></HTML>
-<HTML><p></HTML>with a continuation<HTML></p></HTML>
-<HTML><ol start="4" style="list-style-type: lower-roman;"></HTML>
-<HTML><li></HTML>sublist with roman numerals, starting with 4<HTML></li></HTML>
-<HTML><li></HTML>more items
-<HTML><ol style="list-style-type: upper-alpha;"></HTML>
-<HTML><li></HTML>a subsublist<HTML></li></HTML>
-<HTML><li></HTML>a subsublist<HTML></li></HTML><HTML></ol></HTML>
-<HTML></li></HTML><HTML></ol></HTML>
-<HTML></li></HTML><HTML></ol></HTML>
+ - begins with 2
+ - <WRAP>
+and now 3
+with a continuation
+ - sublist with roman numerals, starting with 4
+ - more items
+ - a subsublist
+ - a subsublist
+</WRAP>
Nesting:
-<HTML><ol style="list-style-type: upper-alpha;"></HTML>
-<HTML><li></HTML>Upper Alpha
-<HTML><ol style="list-style-type: upper-roman;"></HTML>
-<HTML><li></HTML>Upper Roman.
-<HTML><ol start="6" style="list-style-type: decimal;"></HTML>
-<HTML><li></HTML>Decimal start with 6
-<HTML><ol start="3" style="list-style-type: lower-alpha;"></HTML>
-<HTML><li></HTML>Lower alpha with paren<HTML></li></HTML><HTML></ol></HTML>
-<HTML></li></HTML><HTML></ol></HTML>
-<HTML></li></HTML><HTML></ol></HTML>
-<HTML></li></HTML><HTML></ol></HTML>
+ - <WRAP>
+Upper Alpha
+ - <WRAP>
+Upper Roman.
+ - <WRAP>
+Decimal start with 6
+ - Lower alpha with paren
+</WRAP>
+</WRAP>
+</WRAP>
Autonumbering:
@@ -271,32 +267,32 @@ Loose:
Multiple blocks with italics:
-<HTML><dl></HTML>
-<HTML><dt></HTML>//apple//<HTML></dt></HTML>
-<HTML><dd></HTML><HTML><p></HTML>red fruit<HTML></p></HTML>
-<HTML><p></HTML>contains seeds, crisp, pleasant to taste<HTML></p></HTML><HTML></dd></HTML>
-<HTML><dt></HTML>//orange//<HTML></dt></HTML>
-<HTML><dd></HTML><HTML><p></HTML>orange fruit<HTML></p></HTML>
+ * **//apple//** <WRAP>
+red fruit
+contains seeds, crisp, pleasant to taste
+</WRAP>
+ * **//orange//** <WRAP>
+orange fruit
<code>
{ orange code block }
</code>
-> <HTML><p></HTML>orange block quote<HTML></p></HTML>
-<HTML></dd></HTML><HTML></dl></HTML>
+> orange block quote
+</WRAP>
Multiple definitions, tight:
- * **apple** red fruitcomputer
- * **orange** orange fruitbank
+ * **apple** red fruit; computer
+ * **orange** orange fruit; bank
Multiple definitions, loose:
- * **apple** red fruitcomputer
- * **orange** orange fruitbank
+ * **apple** red fruit; computer
+ * **orange** orange fruit; bank
Blank line after term, indented marker, alternate markers:
- * **apple** red fruitcomputer
+ * **apple** red fruit; computer
* **orange** orange fruit
- sublist
- sublist
@@ -318,23 +314,11 @@ bar
Interpreted markdown in a table:
-<HTML>
-<table>
-<tr>
-<td>
-</HTML>
+
This is //emphasized//
-<HTML>
-</td>
-<td>
-</HTML>
+
And this is **strong**
-<HTML>
-</td>
-</tr>
-</table>
-<script type="text/javascript">document.write('This *should not* be interpreted as markdown');</script>
-</HTML>
+
Here’s a simple block:
foo
@@ -362,20 +346,10 @@ foo
This should just be an HTML comment:
-<HTML>
-<!-- Comment -->
-</HTML>
+
Multiline:
-<HTML>
-<!--
-Blah
-Blah
--->
-<!--
- This is another comment.
--->
-</HTML>
+
Code block:
<code>
@@ -384,9 +358,7 @@ Code block:
Just plain comment, with trailing spaces on the line:
-<HTML>
-<!-- foo -->
-</HTML>
+
Code:
<code>
@@ -395,17 +367,7 @@ Code:
Hr’s:
-<HTML>
-<hr>
-<hr />
-<hr />
-<hr>
-<hr />
-<hr />
-<hr class="foo" id="bar" />
-<hr class="foo" id="bar" />
-<hr class="foo" id="bar">
-</HTML>
+
----
@@ -644,7 +606,7 @@ If you want, you can indent every line, but you can also be lazy and just indent
))
> Notes can go in quotes.((In quote.
-> ))
+))
- And in list items.((In list.))