diff options
| author | SavagePeanut <sourcehut@lazytapir.com> | 2024-07-29 13:40:13 -0500 |
|---|---|---|
| committer | SavagePeanut <sourcehut@lazytapir.com> | 2024-07-29 13:40:13 -0500 |
| commit | 57ded2c0151bdf9c71da2073d83ac3021d56f6c8 (patch) | |
| tree | 730210d1268b5022ed8c41f851947c656a95cf54 | |
| parent | e65a593a121935a245ef02b24d2b9464665c05f8 (diff) | |
add tests for escapting <element/>s in matrix
| -rw-r--r-- | tests/test_matrix.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/test_matrix.py b/tests/test_matrix.py index 01723a9..e1782d1 100644 --- a/tests/test_matrix.py +++ b/tests/test_matrix.py @@ -301,3 +301,23 @@ def test_weird_utf8(): test = "~\u200b~" formatted_body = "<strike>\u200b</strike>" assert(format_for_matrix(test) == formatted_body) + + test = "<element>" + formatted_body = "<element>" + assert(format_for_matrix(test) == formatted_body) + + test = "< element >" + formatted_body = "< element >" + assert(format_for_matrix(test) == formatted_body) + + test = "< element>" + formatted_body = "< element>" + assert(format_for_matrix(test) == formatted_body) + + test = "<element >" + formatted_body = "<element >" + assert(format_for_matrix(test) == formatted_body) + + test = "<element> malicious script </element>" + formatted_body = "<element> malicious script </element>" + assert(format_for_matrix(test) == formatted_body) |
