• Jimako
    Main Admin
    Posts: 359
    Joined: 1 year ago
    Mon May 16 2022, 18:32  Jimako

    Actual situation: all bbarea fields have now


    tags around text (you can manually change it to
    ,

    but reductact tags are still there)

    Why is it problem?

    If your markup is for example (problems with W3C validation):

    {CMENUBODY}

    - Error: Element p not allowed as child of element h3 in this context.

    OR

    - Error: No p element in scope but a p end tag seen.

    So what to do? Override core CMENUBODY shortcode in theme shortcodes.

    1. add add theme_shortcodes class $override variable (before _construct() )

    var $override = true;

    1. add new method:
    function sc_cmenubody($parm='')
    {
        $sc   = e107::getScBatch('page', null, 'cpage');
        $data = $sc->getVars();                
        $text =  e107::getParser()->toHTML(vartrue($data['menu_text'],''), true, 'BODY');  
        $text =  str_replace(array("

    ","

    "), "", $text); return $text; }

    It's done. Just remember that all CMENUBODY is now without


    tags, so you need to use

    {CMENUBODY}


    anywhere in template