Ticket #16227: convertEntities-Firebug-Fix.diff
File convertEntities-Firebug-Fix.diff, 9.8 KB (added by , 14 years ago) |
---|
-
wp-includes/script-loader.php
68 68 $scripts->add_data( 'common', 'group', 1 ); 69 69 $scripts->localize( 'common', 'commonL10n', array( 70 70 'warnDelete' => __("You are about to permanently delete the selected items.\n 'Cancel' to stop, 'OK' to delete."), 71 'l10n_print_after' => ' try{convertEntities(commonL10n);}catch(e){};'71 'l10n_print_after' => 'if (typeof convertEntities=="function"){convertEntities(commonL10n);}' 72 72 ) ); 73 73 74 74 $scripts->add( 'sack', "/wp-includes/js/tw-sack$suffix.js", false, '1.6.1' ); … … 86 86 'enterURL' => __('Enter the URL'), 87 87 'enterImageURL' => __('Enter the URL of the image'), 88 88 'enterImageDescription' => __('Enter a description of the image'), 89 'l10n_print_after' => ' try{convertEntities(quicktagsL10n);}catch(e){};'89 'l10n_print_after' => 'if (typeof convertEntities=="function"){convertEntities(quicktagsL10n);}' 90 90 ) ); 91 91 92 92 $scripts->add( 'colorpicker', "/wp-includes/js/colorpicker$suffix.js", array('prototype'), '3517m' ); … … 100 100 $scripts->localize( 'wp-ajax-response', 'wpAjax', array( 101 101 'noPerm' => __('You do not have permission to do that.'), 102 102 'broken' => __('An unidentified error has occurred.'), 103 'l10n_print_after' => ' try{convertEntities(wpAjax);}catch(e){};'103 'l10n_print_after' => 'if (typeof convertEntities=="function"){convertEntities(wpAjax);}' 104 104 ) ); 105 105 106 106 $scripts->add( 'autosave', "/wp-includes/js/autosave$suffix.js", array('schedule', 'wp-ajax-response'), '20101004' ); … … 193 193 'of' => __('of'), 194 194 'close' => __('Close'), 195 195 'noiframes' => __('This feature requires inline frames. You have iframes disabled or your browser does not support them.'), 196 'l10n_print_after' => ' try{convertEntities(thickboxL10n);}catch(e){};'196 'l10n_print_after' => 'if (typeof convertEntities=="function"){convertEntities(thickboxL10n);}' 197 197 ) ); 198 198 199 199 … … 236 236 'crunching' => __('Crunching…'), 237 237 'deleted' => __('moved to the trash.'), 238 238 'error_uploading' => __('“%s” has failed to upload due to an error'), 239 'l10n_print_after' => ' try{convertEntities(swfuploadL10n);}catch(e){};',239 'l10n_print_after' => 'if (typeof convertEntities=="function"){convertEntities(swfuploadL10n);}', 240 240 ) ); 241 241 242 242 $scripts->add( 'comment-reply', "/wp-includes/js/comment-reply$suffix.js", false, '20090102'); … … 256 256 'good' => _x('Medium', 'password strength'), 257 257 'strong' => __('Strong'), 258 258 'mismatch' => __('Mismatch'), 259 'l10n_print_after' => ' try{convertEntities(pwsL10n);}catch(e){};'259 'l10n_print_after' => 'if (typeof convertEntities=="function"){convertEntities(pwsL10n);}' 260 260 ) ); 261 261 262 262 $scripts->add( 'user-profile', "/wp-admin/js/user-profile$suffix.js", array( 'jquery', 'password-strength-meter' ), '20110113' ); … … 265 265 $scripts->add( 'admin-bar', "/wp-includes/js/admin-bar$suffix.js", false, '20110112a' ); 266 266 $scripts->add_data( 'admin-bar', 'group', 1 ); 267 267 $scripts->localize( 'admin-bar', 'adminBarL10n', array( 268 'l10n_print_after' => ' try{convertEntities(adminBarL10n);}catch(e){};',268 'l10n_print_after' => 'if (typeof convertEntities=="function"){convertEntities(adminBarL10n);}', 269 269 ) ); 270 270 271 271 $scripts->add( 'wplink', "/wp-includes/js/tinymce/plugins/wplink/js/wplink$suffix.js", array('jquery'), '20110111' ); … … 274 274 'save' => __('Add Link'), 275 275 'noTitle' => __('(no title)'), 276 276 'noMatchesFound' => __('No matches found.'), 277 'l10n_print_after' => ' try{convertEntities(wpLinkL10n);}catch(e){};',277 'l10n_print_after' => 'if (typeof convertEntities=="function"){convertEntities(wpLinkL10n);}', 278 278 ) ); 279 279 280 280 $scripts->add( 'wpdialogs-popup', "/wp-includes/js/tinymce/plugins/wpdialogs/js/popup$suffix.js", array( 'jquery-ui-dialog' ), '20101119' ); … … 285 285 $scripts->localize( 'ajaxcat', 'catL10n', array( 286 286 'add' => esc_attr(__('Add')), 287 287 'how' => __('Separate multiple categories with commas.'), 288 'l10n_print_after' => ' try{convertEntities(catL10n);}catch(e){};'288 'l10n_print_after' => 'if (typeof convertEntities=="function"){convertEntities(catL10n);}' 289 289 ) ); 290 290 291 291 $scripts->add( 'admin-categories', "/wp-admin/js/categories$suffix.js", array('wp-lists'), '20091201' ); … … 296 296 $scripts->localize( 'admin-tags', 'tagsl10n', array( 297 297 'noPerm' => __('You do not have permission to do that.'), 298 298 'broken' => __('An unidentified error has occurred.'), 299 'l10n_print_after' => ' try{convertEntities(tagsl10n);}catch(e){};'299 'l10n_print_after' => 'if (typeof convertEntities=="function"){convertEntities(tagsl10n);}' 300 300 )); 301 301 302 302 $scripts->add( 'admin-custom-fields', "/wp-admin/js/custom-fields$suffix.js", array('wp-lists'), '20090106' ); … … 307 307 $scripts->localize( 'list-table', 'listTableL10n', array( 308 308 'error' => __('An error has occurred while loading the items.'), 309 309 'search' => __('Search results for “%s”'), 310 'l10n_print_after' => ' try{convertEntities(listTableL10n);}catch(e){};'310 'l10n_print_after' => 'if (typeof convertEntities=="function"){convertEntities(listTableL10n);}' 311 311 ) ); 312 312 313 313 $scripts->add( 'admin-comments', "/wp-admin/js/edit-comments$suffix.js", array('wp-lists', 'list-table', 'jquery-ui-resizable', 'quicktags'), '20101223' ); … … 349 349 'password' => __('Password Protected'), 350 350 'privatelyPublished' => __('Privately Published'), 351 351 'published' => __('Published'), 352 'l10n_print_after' => ' try{convertEntities(postL10n);}catch(e){};'352 'l10n_print_after' => 'if (typeof convertEntities=="function"){convertEntities(postL10n);}' 353 353 ) ); 354 354 355 355 $scripts->add( 'link', "/wp-admin/js/link$suffix.js", array('wp-lists', 'postbox'), '20090526' ); … … 361 361 'cancel' => __('Cancel'), 362 362 'edit' => __('Edit'), 363 363 'submittedOn' => __('Submitted on:'), 364 'l10n_print_after' => ' try{convertEntities(commentL10n);}catch(e){};'364 'l10n_print_after' => 'if (typeof convertEntities=="function"){convertEntities(commentL10n);}' 365 365 ) ); 366 366 367 367 $scripts->add( 'admin-gallery', "/wp-admin/js/gallery$suffix.js", array( 'jquery-ui-sortable' ), '20090516' ); … … 376 376 $scripts->add_data( 'word-count', 'group', 1 ); 377 377 $scripts->localize( 'word-count', 'wordCountL10n', array( 378 378 'count' => __('Word count: %d'), 379 'l10n_print_after' => ' try{convertEntities(wordCountL10n);}catch(e){};'379 'l10n_print_after' => 'if (typeof convertEntities=="function"){convertEntities(wordCountL10n);}' 380 380 )); 381 381 382 382 $scripts->add( 'theme', "/wp-admin/js/theme$suffix.js", array( 'thickbox', 'list-table' ), '20101123' ); … … 391 391 'error' => __('Error while saving the changes.'), 392 392 'ntdeltitle' => __('Remove From Bulk Edit'), 393 393 'notitle' => __('(no title)'), 394 'l10n_print_after' => ' try{convertEntities(inlineEditL10n);}catch(e){};'394 'l10n_print_after' => 'if (typeof convertEntities=="function"){convertEntities(inlineEditL10n);}' 395 395 ) ); 396 396 397 397 $scripts->add( 'inline-edit-tax', "/wp-admin/js/inline-edit-tax$suffix.js", array( 'jquery' ), '20100615' ); 398 398 $scripts->add_data( 'inline-edit-tax', 'group', 1 ); 399 399 $scripts->localize( 'inline-edit-tax', 'inlineEditL10n', array( 400 400 'error' => __('Error while saving the changes.'), 401 'l10n_print_after' => ' try{convertEntities(inlineEditL10n);}catch(e){};'401 'l10n_print_after' => 'if (typeof convertEntities=="function"){convertEntities(inlineEditL10n);}' 402 402 ) ); 403 403 404 404 $scripts->add( 'plugin-install', "/wp-admin/js/plugin-install$suffix.js", array( 'jquery', 'thickbox' ), '20110113' ); … … 406 406 $scripts->localize( 'plugin-install', 'plugininstallL10n', array( 407 407 'plugin_information' => __('Plugin Information:'), 408 408 'ays' => __('Are you sure you want to install this plugin?'), 409 'l10n_print_after' => ' try{convertEntities(plugininstallL10n);}catch(e){};'409 'l10n_print_after' => 'if (typeof convertEntities=="function"){convertEntities(plugininstallL10n);}' 410 410 ) ); 411 411 412 412 $scripts->add( 'farbtastic', '/wp-admin/js/farbtastic.js', array('jquery'), '1.2' ); … … 432 432 'saving' => __( 'Saving...' ), 433 433 'error' => __( 'Could not set that as the thumbnail image. Try a different attachment.' ), 434 434 'done' => __( 'Done' ), 435 'l10n_print_after' => ' try{convertEntities(setPostThumbnailL10n);}catch(e){};'435 'l10n_print_after' => 'if (typeof convertEntities=="function"){convertEntities(setPostThumbnailL10n);}' 436 436 ) ); 437 437 438 438 // Navigation Menus … … 441 441 'noResultsFound' => _x('No results found.', 'search results'), 442 442 'warnDeleteMenu' => __( "You are about to permanently delete this menu. \n 'Cancel' to stop, 'OK' to delete." ), 443 443 'saveAlert' => __('The changes you made will be lost if you navigate away from this page.'), 444 'l10n_print_after' => ' try{convertEntities(navMenuL10n);}catch(e){};'444 'l10n_print_after' => 'if (typeof convertEntities=="function"){convertEntities(navMenuL10n);}' 445 445 ) ); 446 446 447 447 $scripts->add( 'custom-background', "/wp-admin/js/custom-background$suffix.js", array('farbtastic'), '20101025' ); … … 565 565 'requestFile' => admin_url('admin-ajax.php'), 566 566 'savingText' => __('Saving Draft…'), 567 567 'saveAlert' => __('The changes you made will be lost if you navigate away from this page.'), 568 'l10n_print_after' => ' try{convertEntities(autosaveL10n);}catch(e){};'568 'l10n_print_after' => 'if (typeof convertEntities=="function"){convertEntities(autosaveL10n);}' 569 569 ) ); 570 570 571 571 } -
wp-admin/install.php
257 257 strong: "<?php echo esc_js( __( 'Strong' ) ); ?>", 258 258 mismatch: "<?php echo esc_js( __( 'Mismatch' ) ); ?>" 259 259 }; 260 try{convertEntities(pwsL10n);}catch(e){}; 260 if (typeof convertEntities=="function"){convertEntities(pwsL10n);} 261 261 /* ]]> */ 262 262 </script> 263 263 </body>