
Bo?o Recko - 2013-09-10 12:41:24
I had this error on Xamp, Windows 7 home premium, Firefox 23.0.1:
SyntaxError: malformed hexadecimal character escape sequence
Source script: http://localhost/html/ptcdebug/example_ptcdebug.php#
Row: 1, Column: 60
Code:
y='none'; }}}};function read_code(filename,line) {var query="http://localhostC:\xampp\htdocs\localdocs\html\ptcdebug/Ptc
I resolved this adding addslashes() to the code that gets host and the code that gets the document root (see line 1417, the _includeJs() function):
[code]
...
function read_code(filename,line)
{
var query="http://' .
addslashes($_SERVER['HTTP_HOST']) . $path=addslashes(str_replace($_SERVER['DOCUMENT_ROOT'],'',
realpath(dirname(__FILE__)))) .
'/PtcDebug.php?file="+filename;
...
Looks like the path caused troubles, since it contains the \x sequence:
http://localhostC:\xampp\htdocs\...