Skip to content

Commit

Permalink
Fixed issue #18343: Problem with double slash in an URL(IIS) (#3154)
Browse files Browse the repository at this point in the history
* Fixed issue #18343: Problem with interpreting double slash in an URL (IIS)
Dev: intval to get 0 in case of empty

* Dev: one more for popup (group editor)
  • Loading branch information
Shnoulle committed May 19, 2023
1 parent 9e1af46 commit 5ad41fe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions application/helpers/admin/htmleditor_helper.php
Expand Up @@ -182,7 +182,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 @@ -243,9 +243,9 @@ function getInlineEditor($fieldtype, $fieldname, $fieldtext, $surveyID = null, $
$oCKeditorVarName = CKEDITOR.replace('$fieldname', {
LimeReplacementFieldsType : \"".$fieldtype."\"
,LimeReplacementFieldsSID : \"".$surveyID."\"
,LimeReplacementFieldsGID : \"".$gID."\"
,LimeReplacementFieldsQID : \"".$qID."\"
,LimeReplacementFieldsSID : \"".intval($surveyID)."\"
,LimeReplacementFieldsGID : \"".intval($gID)."\"
,LimeReplacementFieldsQID : \"".intval($qID)."\"
,LimeReplacementFieldsAction : \"".$action."\"
,LimeReplacementFieldsPath : \"".Yii::app()->getController()->createUrl("admin/limereplacementfields/sa/index/")."\"
,language:'".sTranslateLangCode2CK(Yii::app()->session['adminlang'])."'"
Expand Down
6 changes: 3 additions & 3 deletions application/views/admin/htmleditor/pop_editor_view.php
Expand Up @@ -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("/admin/limereplacementfields/sa/index"); ?>",
Expand Down

0 comments on commit 5ad41fe

Please sign in to comment.