File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed
Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 33define ('ENV_PROD ' , 'prod ' );
44define ('ENV_DEV ' , 'dev ' );
55
6- define ('UDOIT_VERSION ' , '2.4.1 ' );
6+ define ('UDOIT_VERSION ' , '2.4.2 ' );
77
88// SET UP AUTOLOADER (uses autoload rules from composer)
99require_once (__DIR__ .'/../vendor/autoload.php ' );
Original file line number Diff line number Diff line change 7070echo ("Migrating old reports from disk to database. \r\n" );
7171
7272// Grab all rows from the reports table
73- if ($ rows = UdoidDB ::query ('SELECT * FROM reports ' )) {
73+ if ($ rows = UdoitDB ::query ('SELECT * FROM reports ' )) {
7474 $ rows = $ rows ->fetchAll ();
7575}
7676
Original file line number Diff line number Diff line change 2020var progressTimer = null ;
2121var $doc = $ ( document ) ; // hold a jquery doc reference
2222
23+ /* Escapes special characters for use in jquery selectors. */
24+ function escapeSelector ( sel ) {
25+ return sel . replace ( / ( : | \. | \[ | \] | , | = | @ | \| ) / g, "\\$1" ) ;
26+ }
27+
2328/* Fades out and destroys the popup window and background. */
2429function killButton ( callback ) {
2530 var $popup = $ ( '#popup' ) ;
@@ -355,7 +360,7 @@ $doc.ready(function() {
355360
356361 // view error source
357362 $doc . on ( 'click' , '.viewError' , function ( e ) {
358- let errorId = e . target . dataset . error ;
363+ let errorId = escapeSelector ( e . target . dataset . error ) ;
359364 let $error = $ ( '#' + errorId ) ;
360365
361366 $ ( this ) . addClass ( 'hidden' ) ;
@@ -368,7 +373,7 @@ $doc.ready(function() {
368373
369374 // close error source
370375 $doc . on ( 'click' , '.closeError' , function ( e ) {
371- let errorId = e . target . dataset . error ;
376+ let errorId = escapeSelector ( e . target . dataset . error ) ;
372377 let $error = $ ( '#' + errorId ) ;
373378 let $vidiframe = $error . find ( 'div.more-info .error-preview iframe' )
374379 let tmpElement = null
You can’t perform that action at this time.
0 commit comments