Skip to:
Content
Pages
Categories
Search
Top
Bottom

MathML by Wiris and Bbpress


  • nadmin1
    Participant

    @nadmin1

    Hi,

    It looks like MathML is not being rendered. WIRISplugins.js is properly loaded, but it does not found any MathML to parse and render.
    Indeed, the following:
    document.getElementsByTagName(‘math’)
    does not produce any results.
    The issue lies in either bbPress:Regarding bbPress, after a quick search in their forums, apparently you need to whitelist MathML tags in bbPress, so that users can add MathML in their forum posts.

    Maybe there is a plugin or some instructions to allow MathML tags in bbPress. Unfortunately, we are not familiar with bbPress internals. You will probably get more useful info by asking in their support channels how to allow MathML tags in posts.

Viewing 1 replies (of 1 total)

  • Robin W
    Moderator

    @robin-w

    I think this may do it – but I’ve no knowledge of mathml, other than a quick google

    This code is untested, but add this to your child theme function file or use the ‘code snippets’ plugin

    add_filter( 'bbp_kses_allowed_tags', 'rew_add_mathml') ;
    
    function rew_add_mathml ($allowed) {
    	$allowed['math'] = array() ;
    	$allowed['mo'] = array() ;
    	$allowed['mi'] = array() ;
    
    return $allowed ;
    }

    you would need to add lines for other tags required.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar