Move adding the Safe extension to after the configuration is complete so that user configuration of the extensions array can't remove it.

This commit is contained in:
Davide P. Cervone 2013-05-12 13:45:09 -04:00
parent d36d551496
commit d3a9dbc805

View File

@ -29,7 +29,9 @@
* limitations under the License.
*/
if (!MathJax.Hub.config.extensions) {MathJax.Hub.config.extensions = []}
MathJax.Hub.config.extensions.push("Safe.js");
MathJax.Hub.Register.StartupHook("End Config", function () {
if (!MathJax.Hub.config.extensions) {MathJax.Hub.config.extensions = []}
MathJax.Hub.config.extensions.push("Safe.js");
});
MathJax.Ajax.loadComplete("[MathJax]/config/Safe.js");
MathJax.Ajax.loadComplete("[MathJax]/config/Safe.js");