Skip to content

Commit

Permalink
Fixed issue #18343: Problem with double slash in an URL(IIS) (#3155)
Browse files Browse the repository at this point in the history
Dev: use intval
Dev: most simple fix to avoid more commit (see mantis 18811)
  • Loading branch information
Shnoulle committed May 19, 2023
1 parent 054f9bb commit a706793
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions application/helpers/admin/htmleditor_helper.php
Expand Up @@ -209,7 +209,7 @@ function getPopupEditor($fieldtype, $fieldname, $fieldtext, $surveyID = null, $g
$class = "editorLink input-group-addon";
}
$htmlcode .= ""
. "<a href=\"javascript:start_popup_editor('" . $fieldname . "','" . addslashes(htmlspecialchars_decode($fieldtext, ENT_QUOTES)) . "','" . $surveyID . "','" . $gID . "','" . $qID . "','" . $fieldtype . "','" . $action . "')\" id='" . $fieldname . "_ctrl' class='{$class} btn btn-default btn-xs'>\n"
. "<a href=\"javascript:start_popup_editor('" . $fieldname . "','" . addslashes(htmlspecialchars_decode($fieldtext, ENT_QUOTES)) . "','" . intval($surveyID) . "','" . intval($gID) . "','" . intval($qID) . "','" . $fieldtype . "','" . $action . "')\" id='" . $fieldname . "_ctrl' class='{$class} btn btn-default btn-xs'>\n"
. "\t<i class='fa fa-pencil btneditanswerena' id='" . $fieldname . "_popupctrlena' data-toggle='tooltip' data-placement='bottom' title='" . gT("Start HTML editor in a popup window") . "'></i>"
. "\t<i class='fa fa-pencil btneditanswerdis' id='" . $fieldname . "_popupctrldis' style='display:none' ></i>"
. "</a>\n";
Expand Down Expand Up @@ -313,9 +313,9 @@ function getInlineEditor($fieldtype, $fieldname, $fieldtext, $surveyID = null, $
var ckeConfig = {
LimeReplacementFieldsType : \"" . $fieldtype . "\"
,LimeReplacementFieldsSID : \"" . $surveyID . "\"
,LimeReplacementFieldsGID : \"" . $gID . "\"
,LimeReplacementFieldsQID : \"" . $qID . "\"
,LimeReplacementFieldsSID : \"" . intval($surveyID) . "\"
,LimeReplacementFieldsGID : \"" . intval($gID) . "\"
,LimeReplacementFieldsQID : \"" . intval($qID) . "\"
,LimeReplacementFieldsAction : \"" . $action . "\"
,LimeReplacementFieldsPath : \"" . Yii::app()->getController()->createUrl("limereplacementfields/index") . "\"
,language:'" . sTranslateLangCode2CK(Yii::app()->session['adminlang']) . "'"
Expand All @@ -336,7 +336,7 @@ function getInlineEditor($fieldtype, $fieldname, $fieldtext, $surveyID = null, $
}
// Show full toolbar if cookie is set
var toolbarCookie = CKEDITOR.tools.getCookie('LS_CKE_TOOLBAR');
var toolbarCookie = CKEDITOR.tools.getCookie('LS_CKE_TOOLBAR');
if (toolbarCookie == 'full' && ckeConfig.toolbar == ckeConfig.basicToolbar) {
ckeConfig.toolbar = ckeConfig.fullToolbar;
}
Expand Down
10 changes: 5 additions & 5 deletions application/views/admin/htmleditor/pop_editor_view.php
Expand Up @@ -34,8 +34,8 @@ function closeme()
var sReplacementFieldButton = '<?php eT('Insert/edit placeholder field','js');?>';
$(document).on('ready pjax:scriptcomplete', function(){
//console.log('iGroupId: '+iGroupId);
// Better use try/catch to not crash JS completely
/*
// Better use try/catch to not crash JS completely
/*
try{ console.log('iGroupId: '+iGroupId); } catch (e){ console.log(e); }
*/
if($('textarea').length > 0){
Expand All @@ -46,9 +46,9 @@ function closeme()
toolbarStartupExpanded : true,
ToolbarCanCollapse : false,
toolbar : '<?php echo $toolbarname; ?>',
LimeReplacementFieldsSID : "<?php echo $iSurveyId; ?>",
LimeReplacementFieldsGID : "<?php echo $iGroupId; ?>",
LimeReplacementFieldsQID : "<?php echo $iQuestionId; ?>",
LimeReplacementFieldsSID : "<?php echo intval($iSurveyId); ?>",
LimeReplacementFieldsGID : "<?php echo intval($iGroupId); ?>",
LimeReplacementFieldsQID : "<?php echo intval($iQuestionId); ?>",
LimeReplacementFieldsType: "<?php echo $sFieldType; ?>",
LimeReplacementFieldsAction: "<?php echo $sAction; ?>",
LimeReplacementFieldsPath : "<?php echo $this->createUrl("/limereplacementfields/index"); ?>",
Expand Down

0 comments on commit a706793

Please sign in to comment.