diff options
author | Aleksander Machniak <alec@alec.pl> | 2019-12-16 17:13:37 +0300 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2019-12-16 17:17:28 +0300 |
commit | 37cfa0a43b542add71b7d8ae9cfcae345448835c (patch) | |
tree | a49973989e0067dd66e83fdb7ed73bbb524b2e2b /tests | |
parent | 5f30dc68a3b67eedb57a5f0115b4bad783cb3347 (diff) |
Fix malformed characters in HTML message with charset meta tag not in head (#7116)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/MailFunc.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/MailFunc.php b/tests/MailFunc.php index ac073f085..a231644ff 100644 --- a/tests/MailFunc.php +++ b/tests/MailFunc.php @@ -172,6 +172,11 @@ class MailFunc extends PHPUnit_Framework_TestCase $body = '<html><head></head>Test1<br>Test2'; $washed = rcmail_wash_html($body, $args); $this->assertTrue(strpos($washed, "<html><head>$meta</head>") === 0, "Meta tag insertion (5)"); + + $body = '<html><head></head><body>Test1<br>Test2<meta charset="utf-8"></body>'; + $washed = rcmail_wash_html($body, $args); + $this->assertTrue(strpos($washed, "<html><head>$meta</head>") === 0, "Meta tag insertion (6)"); + $this->assertTrue(strpos($washed, "Test2</body>") > 0, "Meta tag insertion (7)"); } /** |