Disabled bootstrap_tables XSS escaping support since we leverage CI one (#39)

This commit is contained in:
FrancescoUK
2016-06-08 11:25:53 +01:00
parent fe845692bf
commit 5cf23f2bd3
3 changed files with 42 additions and 42 deletions

View File

@@ -2,40 +2,40 @@
'use strict';
$.fn.bootstrapTable.locales['<?php echo $this->config->item('language'); ?>'] = {
formatLoadingMessage: function () {
return '<?php echo $this->lang->line('tables_loading');?>';
},
formatRecordsPerPage: function (pageNumber) {
return '<?php echo $this->lang->line('tables_rows_per_page'); ?>'.replace('{0}', pageNumber);
},
formatShowingRows: function (pageFrom, pageTo, totalRows) {
return '<?php echo $this->lang->line('tables_page_from_to'); ?>'.replace('{0}', pageFrom).replace('{1}', pageTo).replace('{2}', totalRows);
},
formatSearch: function () {
return '<?php echo $this->lang->line('common_search'); ?>';
},
formatNoMatches: function () {
return '<?php echo $this->lang->line(preg_match('(customers|suppliers|employees)', $controller_name) ?
'common_no_persons_to_display' : $controller_name . '_no_' . $controller_name .'_to_display'); ?>';
},
formatPaginationSwitch: function () {
return '<?php echo $this->lang->line('tables_hide_show_pagination'); ?>';
},
formatRefresh: function () {
return '<?php echo $this->lang->line('tables_refresh'); ?>';
},
formatToggle: function () {
return '<?php echo $this->lang->line('tables_toggle'); ?>';
},
formatColumns: function () {
return '<?php echo $this->lang->line('tables_columns'); ?>';
},
formatAllRows: function () {
return '<?php echo $this->lang->line('tables_all'); ?>';
},
formatConfirmDelete : function() {
return '<?php echo $this->lang->line((isset($editable) ? $editable : $controller_name). "_confirm_delete")?>';
}
formatLoadingMessage: function () {
return '<?php echo $this->lang->line('tables_loading');?>';
},
formatRecordsPerPage: function (pageNumber) {
return '<?php echo $this->lang->line('tables_rows_per_page'); ?>'.replace('{0}', pageNumber);
},
formatShowingRows: function (pageFrom, pageTo, totalRows) {
return '<?php echo $this->lang->line('tables_page_from_to'); ?>'.replace('{0}', pageFrom).replace('{1}', pageTo).replace('{2}', totalRows);
},
formatSearch: function () {
return '<?php echo $this->lang->line('common_search'); ?>';
},
formatNoMatches: function () {
return '<?php echo $this->lang->line(preg_match('(customers|suppliers|employees)', $controller_name) ?
'common_no_persons_to_display' : $controller_name . '_no_' . $controller_name .'_to_display'); ?>';
},
formatPaginationSwitch: function () {
return '<?php echo $this->lang->line('tables_hide_show_pagination'); ?>';
},
formatRefresh: function () {
return '<?php echo $this->lang->line('tables_refresh'); ?>';
},
formatToggle: function () {
return '<?php echo $this->lang->line('tables_toggle'); ?>';
},
formatColumns: function () {
return '<?php echo $this->lang->line('tables_columns'); ?>';
},
formatAllRows: function () {
return '<?php echo $this->lang->line('tables_all'); ?>';
},
formatConfirmDelete : function() {
return '<?php echo $this->lang->line((isset($editable) ? $editable : $controller_name). "_confirm_delete")?>';
}
};
$.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['<?php echo $this->config->item('language');?>']);

View File

@@ -1,6 +1,4 @@
<?php
$this->load->view("partial/header");
?>
<?php $this->load->view("partial/header"); ?>
<div id="page_title"><?php echo $title ?></div>
@@ -37,11 +35,11 @@
showExport: true,
data: <?php echo json_encode($data); ?>,
iconSize: 'sm',
paginationVAlign: 'bottom'
paginationVAlign: 'bottom',
escape: false
});
});
</script>
<?php
$this->load->view("partial/footer");
?>
<?php $this->load->view("partial/footer"); ?>

View File

@@ -1,4 +1,4 @@
<?php $this->load->view("partial/header");?>
<?php $this->load->view("partial/header"); ?>
<div id="page_title"><?php echo $title ?></div>
@@ -48,6 +48,7 @@
paginationVAlign: 'bottom',
detailView: true,
uniqueId: 'id',
escape: false,
onPageChange: init_dialog,
onPostBody: function() {
dialog_support.init("a.modal-dlg");
@@ -63,4 +64,5 @@
init_dialog();
});
</script>
<?php $this->load->view("partial/footer"); ?>