Bladeren bron

gallery html fix

amic 1 maand geleden
bovenliggende
commit
9a431d7182
2 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. 1 1
      forks/galleryManager/views/galleryManager.php
  2. 1 1
      modules/manager/controllers/NewsController.php

+ 1 - 1
forks/galleryManager/views/galleryManager.php

@@ -148,7 +148,7 @@ $gid = $this->context->model->galleryId;
     }
 	function slSave(e, id, obj){
 		title = $("input[name='photo["+e+"][name]']").val();
-		description = $("textarea[name='photo["+e+"][description]']").val();
+		description = encodeURIComponent($("textarea[name='photo["+e+"][description]']").val());
 		$.ajax( 'ajaxgalleryslide?id='+e+'&gid='+id+'&title='+title+'&description='+description).done(function( data ) {
 			d = JSON.parse(data);
 			$('#md-'+d.id).modal('hide');

+ 1 - 1
modules/manager/controllers/NewsController.php

@@ -583,7 +583,7 @@ class NewsController extends BaseController
 			$id = Yii::$app->request->get('id');
 			$gid = Yii::$app->request->get('gid');
 			$title = Yii::$app->request->get('title');
-			$description = Yii::$app->request->get('description');
+			$description = rawurldecode(Yii::$app->request->get('description'));
 			//p = new \manager\models\GalleryImage->getUrl(1,'small');
 			$db = \Yii::$app->db;
 			$gallery = \manager\models\Gallery::find()->andWhere(['id'=>$gid])->one();