* Escape text for attribute or text content.
( s )
| 1379 | * Escape text for attribute or text content. |
| 1380 | */ |
| 1381 | function escapeText( s ) { |
| 1382 | if ( !s ) { |
| 1383 | return ""; |
| 1384 | } |
| 1385 | s = s + ""; |
| 1386 | // Both single quotes and double quotes (for attributes) |
| 1387 | return s.replace( /['"<>&]/g, function( s ) { |
| 1388 | switch( s ) { |
| 1389 | case '\'': |
| 1390 | return '''; |
| 1391 | case '"': |
| 1392 | return '"'; |
| 1393 | case '<': |
| 1394 | return '<'; |
| 1395 | case '>': |
| 1396 | return '>'; |
| 1397 | case '&': |
| 1398 | return '&'; |
| 1399 | } |
| 1400 | }); |
| 1401 | } |
| 1402 | |
| 1403 | function synchronize( callback, last ) { |
| 1404 | config.queue.push( callback ); |
no outgoing calls
no test coverage detected
searching dependent graphs…