File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed
src/addons/filter/mathjaxloader/services/handlers Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ const ASSETS = {
2323 '/node_modules/mathjax/es5/input/mml/extensions' : '/lib/mathjax/input/mml/extensions' ,
2424 '/node_modules/mathjax/es5/input/tex/extensions' : '/lib/mathjax/input/tex/extensions' ,
2525 '/node_modules/mathjax/es5/output/chtml/fonts/woff-v2' : '/lib/mathjax/output/chtml/fonts/woff-v2' ,
26+ '/node_modules/mathjax/es5/ui/safe.js' : '/lib/mathjax/ui/safe.js' ,
2627 '/node_modules/mp3-mediarecorder/dist/vmsg.wasm' : '/lib/vmsg/vmsg.wasm' ,
2728 '/src/core/features/h5p/assets' : '/lib/h5p' ,
2829 '/node_modules/ogv/dist' : '/lib/ogv' ,
Original file line number Diff line number Diff line change @@ -49,13 +49,17 @@ export class AddonFilterMathJaxLoaderHandlerService extends CoreFilterDefaultHan
4949
5050 // The MathJax configuration needs to be created before loading the MathJax script. Changing the options
5151 // after MathJax is initialized doesn't work (e.g. chaning window.MathJax.options or window.MathJax.config.options).
52+ // @todo : Obtain mathjaxconfig from the site.
5253 this . window . MathJax = {
5354 options : {
5455 enableMenu : false , // Disable right-click menu on equations.
5556 } ,
5657 startup : {
5758 typeset : false , // Don't run typeset automatically on the whole page when MathJax is loaded.
5859 } ,
60+ loader : {
61+ load : [ 'ui/safe' ] , // Prevent XSS.
62+ } ,
5963 } ;
6064
6165 // Add the script to the header.
You can’t perform that action at this time.
0 commit comments