From b42cb6793530be6c4ccd711ca98121c8baeb8715 Mon Sep 17 00:00:00 2001 From: Jetha Chan Date: Fri, 17 Jul 2015 22:37:01 +0900 Subject: [PATCH] MDL-50868 weblib: add unit test for ruby support --- lib/tests/weblib_test.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lib/tests/weblib_test.php b/lib/tests/weblib_test.php index 513ee7b43ba..460d7e45980 100644 --- a/lib/tests/weblib_test.php +++ b/lib/tests/weblib_test.php @@ -567,4 +567,19 @@ EXPECTED; $this->assertSame($expected, strip_pluginfile_content($source)); } + public function test_purify_html_ruby() { + + $this->resetAfterTest(); + + $ruby = + "

京都(きょうと)は" . + "日本(にほん)の" . + "(みやこ)です。

"; + $illegal = ''; + + $cleaned = purify_html($ruby . $illegal); + $this->assertEquals($ruby, $cleaned); + + } + }