object. The used textprocessor is determined by the $texttype property. * * Parameters: * $translationobj - The object. * * Returns: * HTML */ function textprocessor_apply_translation($translationobj) { return textprocessor_apply($translationobj->text, $translationobj->texttype); } if (!isset($textprocessors)) { $textprocessors = [ "Markdown" => ["Markdown", true], "Plain Text" => [function ($text) { return str_replace(["\r\n", "\n"], ["
", "
"], htmlesc($text)); }, true], "HTML" => [function ($text) { return $text; }, true] ]; }