Skip to content
Snippets Groups Projects
Commit 30ad64f4 authored by Nick Barry's avatar Nick Barry
Browse files

Adjustment to bulletin admin change major name

parent daaacb8b
No related branches found
No related tags found
No related merge requests found
...@@ -145,6 +145,7 @@ class Bulletin_AdminController extends Creq_Controller_Action ...@@ -145,6 +145,7 @@ class Bulletin_AdminController extends Creq_Controller_Action
// get file content edits // get file content edits
$fileContents = $in['file-contents']; $fileContents = $in['file-contents'];
$fileContents = $this->cleanupHtml($fileContents);
/* NOT USED /* NOT USED
// modify page title // modify page title
...@@ -480,7 +481,6 @@ class Bulletin_AdminController extends Creq_Controller_Action ...@@ -480,7 +481,6 @@ class Bulletin_AdminController extends Creq_Controller_Action
// success // success
$this->_helper->getHelper('FlashMessenger')->addMessage("Major '" . $major . "' removed successfully."); $this->_helper->getHelper('FlashMessenger')->addMessage("Major '" . $major . "' removed successfully.");
$this->redirect('/bulletin/admin/remove-major'); $this->redirect('/bulletin/admin/remove-major');
} }
protected function getCurrentEditingYear() protected function getCurrentEditingYear()
...@@ -492,4 +492,18 @@ class Bulletin_AdminController extends Creq_Controller_Action ...@@ -492,4 +492,18 @@ class Bulletin_AdminController extends Creq_Controller_Action
return $currentYear; return $currentYear;
} }
protected function cleanupHtml($html)
{
// replace ' & ' with '&'
$html = str_replace(' & ', ' & ', $html);
// replace '&' with '&'
$html = str_replace('&', '&', $html);
// replace CRLF with LF
$html = str_replace((chr(13).chr(10)), chr(10), $html);
return $html;
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment