diff --git a/application/modules/opac/controllers/CmsController.php b/application/modules/opac/controllers/CmsController.php index 28d38b4ff61d74007359ddd42ae3f06d1d98e088..18500e8306e45831308c64937a1ecd9e839970be 100644 --- a/application/modules/opac/controllers/CmsController.php +++ b/application/modules/opac/controllers/CmsController.php @@ -311,7 +311,7 @@ class CmsController extends Zend_Controller_Action { 'link' => $this->_request->getScheme() . '://' . $this->_request->getServer('HTTP_HOST') . $this->view->url($article->getUrl()), - 'description' => $article->getFullContent(), + 'description' => Class_CmsUrlTransformer::imgUrlRelativeToAbsolute($article->getFullContent()), 'lastUpdate' => strtotime($article->getDateMaj()) ); } diff --git a/ckeditor/core_five_filemanager/scripts/filemanager.js b/ckeditor/core_five_filemanager/scripts/filemanager.js index 8b88d2754d8a30a053f663051bfb092bed01c112..984590c6727fda31ef3056afcd36873ac6f43b25 100644 --- a/ckeditor/core_five_filemanager/scripts/filemanager.js +++ b/ckeditor/core_five_filemanager/scripts/filemanager.js @@ -299,7 +299,6 @@ var formatBytes = function(bytes){ // contextual menu option in list views. // NOTE: closes the window when finished. var selectItem = function(data){ - data['Path'] = window.location.origin+data['Path']; if(window.opener){ if(window.tinyMCEPopup){ // use TinyMCE > 3.0 integration method diff --git a/tests/application/modules/opac/controllers/CmsControllerTest.php b/tests/application/modules/opac/controllers/CmsControllerTest.php index 07bb1c09c9fa118165a9a7fb99ec01a1bac83ab6..2a62bdf37b189ef9bce1c5937edcc24b3cf2be26 100644 --- a/tests/application/modules/opac/controllers/CmsControllerTest.php +++ b/tests/application/modules/opac/controllers/CmsControllerTest.php @@ -81,7 +81,7 @@ extends AbstractControllerTestCase { Class_Article::getLoader() ->newInstanceWithId(1) ->setTitre('La fête de la banane') - ->setContenu('Une fête qui glisse !') + ->setContenu('Une fête qui glisse !<img src="'.BASE_URL.'/image/banane.jpg"/>') ->setDateMaj('2011-11-11 11:11:11'), Class_Article::getLoader() ->newInstanceWithId(2) @@ -93,6 +93,13 @@ extends AbstractControllerTestCase { } + + /** @test */ + public function imgShouldBeDisplayWithAbsoluteUrl() { + $this->assertXPathContentContains('//description', '<img src="http://localhost'.BASE_URL.'/image/banane.jpg"'); + } + + /** @test */ public function channelTitleShouldBeLesDernieresNouvelles() { $this->assertXpathContentContains('//channel/title', 'Les dernières nouvelles');