diff --git a/main/newscorm/lp_controller.php b/main/newscorm/lp_controller.php index 2f63390516..7a639f9ac4 100644 --- a/main/newscorm/lp_controller.php +++ b/main/newscorm/lp_controller.php @@ -577,8 +577,13 @@ switch($action) $_SESSION['oLP']->set_name($_REQUEST['lp_name']); $author= $_REQUEST['lp_author']; //fixing the author name (no body or html tags) - $len = strripos($author,'
')-stripos($author,''); - $author_fixed=substr($author,stripos($author,'
'), $len+4); + if( stripos($author) != 0 ) { + $len = strripos($author,'
')-stripos($author,''); + $author_fixed=substr($author,stripos($author,'
'), $len+4); + } else { + $len = strripos($author,'
'); + $author_fixed=substr($author,stripos($author,''), $len+7); + } $_SESSION['oLP']->set_author($author_fixed); $_SESSION['oLP']->set_encoding($_REQUEST['lp_encoding']);