Ticket #6913: 6913.patch
File 6913.patch, 1.8 KB (added by , 13 years ago) |
---|
-
ckeditor_php4.php
566 566 // JS's "1" and 1 are not. So if we pass "1" or 1 from the PHP backend, 567 567 // we should get the same result in the JS frontend (string). 568 568 // Character replacements for JSON. 569 static $jsonReplaces = array(array("\\", "/", "\n", "\t", "\r", "\b", "\f", '"'), 570 array('\\\\', '\\/', '\\n', '\\t', '\\r', '\\b', '\\f', '\"')); 569 static $jsonReplaces; 570 if (!isset($jsonReplaces)) { 571 $jsonReplaces = array(array("\\", "/", "\n", "\t", "\r", chr(8), "\f", '"'), 572 array('\\\\', '\\/', '\\n', '\\t', '\\r', '\\b', '\\f', '\"')); 573 } 571 574 572 575 $val = str_replace($jsonReplaces[0], $jsonReplaces[1], $val); 573 576 if (strtoupper(substr($val, 0, 9)) == 'CKEDITOR.') { -
ckeditor_php5.php
556 556 // JS's "1" and 1 are not. So if we pass "1" or 1 from the PHP backend, 557 557 // we should get the same result in the JS frontend (string). 558 558 // Character replacements for JSON. 559 static $jsonReplaces = array(array("\\", "/", "\n", "\t", "\r", "\b", "\f", '"'), 560 array('\\\\', '\\/', '\\n', '\\t', '\\r', '\\b', '\\f', '\"')); 559 static $jsonReplaces; 560 if (!isset($jsonReplaces)) { 561 $jsonReplaces = array(array("\\", "/", "\n", "\t", "\r", chr(8), "\f", '"'), 562 array('\\\\', '\\/', '\\n', '\\t', '\\r', '\\b', '\\f', '\"')); 563 } 561 564 562 565 $val = str_replace($jsonReplaces[0], $jsonReplaces[1], $val); 563 566 if (strtoupper(substr($val, 0, 9)) == 'CKEDITOR.') {