diff --git a/modules/stanford_decoupled/src/Plugin/Filter/SuCleanHtml.php b/modules/stanford_decoupled/src/Plugin/Filter/SuCleanHtml.php index bb760401..c3a60bb3 100644 --- a/modules/stanford_decoupled/src/Plugin/Filter/SuCleanHtml.php +++ b/modules/stanford_decoupled/src/Plugin/Filter/SuCleanHtml.php @@ -74,7 +74,7 @@ public function process($text, $langcode) { } } - return new FilterProcessResult($text); + return new FilterProcessResult(trim($text)); } /** diff --git a/modules/stanford_decoupled/tests/src/Unit/Plugin/Filter/SuCleanHtmlTest.php b/modules/stanford_decoupled/tests/src/Unit/Plugin/Filter/SuCleanHtmlTest.php index 5e8cf339..7f5bea1b 100644 --- a/modules/stanford_decoupled/tests/src/Unit/Plugin/Filter/SuCleanHtmlTest.php +++ b/modules/stanford_decoupled/tests/src/Unit/Plugin/Filter/SuCleanHtmlTest.php @@ -14,10 +14,25 @@ */ class SuCleanHtmlTest extends UnitTestCase { + public function filterDataProvider() { + return [ + [ + "\r\n\n\n