Permalink
Browse files

Escape javascript text between quotes since translations have single …

…quotes in it.
  • Loading branch information...
1 parent 8c5eb6d commit 42ccf4a8d7d09c24d9da8c593f4f269a3e9b6e0f @nabab nabab committed Oct 14, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 application/layouts/inlinejs.php
@@ -13,7 +13,7 @@
$(function() {
$('input.datetimepicker').datetimepicker({
- dateFormat: '<?php echo lang('input date format') ?>',
+ dateFormat: '<?php echo str_replace("'","\'",lang('input date format')) ?>',
constrainInput: false
});
});
@@ -147,7 +147,7 @@ function asyncParForEach(array, fn, callback) {
}
});
gg.each(function () { $(this).show() });
- $("#filter-count").text(count + ' <?php echo lang('shown/lc'); ?>' );
+ $("#filter-count").text(count + ' <?php echo str_replace("'","\'",lang('shown/lc')); ?>' );
}).keydown(function(event) {
if (event.which == 13) { // disable enter key on search filter to prevent leaving page
event.preventDefault();
@@ -157,8 +157,8 @@ function asyncParForEach(array, fn, callback) {
$(function(){
$("#i18n_values .edit").editable('<?php echo get_url('i18n', 'edit_value', null, null, false, '&'); ?>', {
- indicator : '<?php echo lang('saving'); ?>',
- tooltip : '<?php echo lang('click to edit'); ?>',
+ indicator : '<?php echo str_replace("'","\'",lang('saving')); ?>',
+ tooltip : '<?php echo str_replace("'","\'",lang('click to edit')); ?>',
style : 'inherit'
});
});

0 comments on commit 42ccf4a

Please sign in to comment.