diff --git a/filter/tex/lib.php b/filter/tex/lib.php index cd2c1cb3879..a0212910317 100644 --- a/filter/tex/lib.php +++ b/filter/tex/lib.php @@ -3,12 +3,15 @@ function tex_sanitize_formula($texexp) { /// Check $texexp against blacklist (whitelisting could be more complete but also harder to maintain) $tex_blacklist = array( - 'include','def','command','loop','repeat','open','toks','output', + 'include','command','loop','repeat','open','toks','output', 'input','catcode','name','^^', + '\def','\edef','\gdef','\xdef', '\every','\errhelp','\errorstopmode','\scrollmode','\nonstopmode', '\batchmode','\read','\write','csname','\newhelp','\uppercase', '\lowercase','\relax','\aftergroup', - '\afterassignment','\expandafter','\noexpand','\special' + '\afterassignment','\expandafter','\noexpand','\special', + '\let', '\futurelet','\else','\fi','\chardef','\makeatletter','\afterground', + '\noexpand','\line','\mathcode','\item','\section','\mbox','\declarerobustcommand' ); return str_ireplace($tex_blacklist, 'forbiddenkeyword', $texexp); @@ -34,4 +37,4 @@ function filter_tex_updatedcallback($name) { delete_records('cache_filters', 'filter', 'algebra'); } -?> \ No newline at end of file +?>