[MySQL] Database JS error blocks database statistics
Database management in a single PHP file
Brought to you by:
jakubvrana
In database overview
MySQL » localhost:/var/run/mysqld/mysqld.sock » Datenbank: a_database_name_here
for table type, counts and so on, the ? will not be replaced by the values because of a JS error:
Uncaught DOMException: Failed to execute 'querySelector' on 'Document': '#Comment-@ log (info)' is not a valid selector.
This comes from at least the space in my view name, it is realy "@ log (info)" :-)
The DOM ids should be build in a "save" manner of the table/view name like this
id = "#Comment" + ("-" + TableOrViewName).replace(/\W+/g, "-").replace(/-+$/g, "");
Fixed by using
[id=""]selector with escaping instead. The proposed ID replacement would make it non-unique.Thanks, you are right.