Skip to content

Commit

Permalink
escape on js variables (#2318)
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoQuote authored Oct 9, 2023
1 parent 929ef03 commit faf8f98
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions sql/templates/detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,15 @@ <h4 class="modal-title text-danger">修改可执行时间</h4>
});
</script>

<script>
var editWorkflowNname = "{{ workflow_detail.workflow_name|escapejs }}";
var editDemandUrl = "{{ workflow_detail.demand_url|escapejs }}";
var editSqlContent = $("#editSqlContent").val();
var editGroup = "{{ workflow_detail.group_name|escapejs }}";
var editClustername = "{{ workflow_detail.instance.instance_name|escapejs }}";
var editDbname = "{{ workflow_detail.db_name|escapejs }}";
var editIsbackup = "{{ workflow_detail.is_backup|escapejs }}";
</script>
<!--按钮控制 -->
<script>
// 表格展开折叠全部行
Expand All @@ -423,14 +432,6 @@ <h4 class="modal-title text-danger">修改可执行时间</h4>
}
});

var editWorkflowNname = "{{ workflow_detail.workflow_name }}";
var editDemandUrl = "{{ workflow_detail.demand_url }}";
var editSqlContent = $("#editSqlContent").val();
var editGroup = "{{ workflow_detail.group_name }}";
var editClustername = "{{ workflow_detail.instance.instance_name }}";
var editDbname = "{{ workflow_detail.db_name }}";
var editIsbackup = "{{ workflow_detail.is_backup }}";

$("#btnEditSql").click(function () {
sessionStorage.setItem('editWorkflowNname', editWorkflowNname);
sessionStorage.setItem('editDemandUrl', editDemandUrl);
Expand Down

0 comments on commit faf8f98

Please sign in to comment.