HTML Encoded characters in Apigee Developer Monetization pages. How to fix same ?

When i navigate to , Monetization settings page or catalog & plans page, I see tabs rendering html encoded characters instead of plan characters. How to fix same ? See how & is changed to & in below screenshot in Apigee Developer Portal.

5140-screen-shot-2017-06-20-at-115540-am.png

Solved Solved
0 1 112
1 ACCEPTED SOLUTION

You can fix same by implementing hook_menu_local_tasks in your theme template.php file by using below code,

Update YOURTHEMENAME in below function & place the code in your custom theme template.php file, Flush all caches.

/**
 * Menu Local Tasks.
 */
function YOURTHEMENAME_menu_local_tasks(&$vars) {
    $output = '';

    if (!empty($vars['primary'])) {
        $vars['primary']['#prefix'] = '<h2 class="element-invisible">' . t('Primary tabs') . '</h2>';
        $vars['primary']['#prefix'] .= '<ul class="tabs--primary nav nav-pills ptabs">';
        $vars['primary']['#suffix'] = '</ul>';
        $output .= html_entity_decode(drupal_render($vars['primary'])) . '<hr>';
    }

    if (!empty($vars['secondary'])) {
        $vars['secondary']['#prefix'] = '<h2 class="element-invisible">' . t('Secondary tabs') . '</h2>';
        $vars['secondary']['#prefix'] .= '<ul class="tabs--secondary pagination pagination-sm stabs">';
        $vars['secondary']['#suffix'] = '</ul>';
        $output .= html_entity_decode(drupal_render($vars['secondary']));
    }

    return $output;
}

Hope it helps someone looking for same.

View solution in original post

1 REPLY 1

You can fix same by implementing hook_menu_local_tasks in your theme template.php file by using below code,

Update YOURTHEMENAME in below function & place the code in your custom theme template.php file, Flush all caches.

/**
 * Menu Local Tasks.
 */
function YOURTHEMENAME_menu_local_tasks(&$vars) {
    $output = '';

    if (!empty($vars['primary'])) {
        $vars['primary']['#prefix'] = '<h2 class="element-invisible">' . t('Primary tabs') . '</h2>';
        $vars['primary']['#prefix'] .= '<ul class="tabs--primary nav nav-pills ptabs">';
        $vars['primary']['#suffix'] = '</ul>';
        $output .= html_entity_decode(drupal_render($vars['primary'])) . '<hr>';
    }

    if (!empty($vars['secondary'])) {
        $vars['secondary']['#prefix'] = '<h2 class="element-invisible">' . t('Secondary tabs') . '</h2>';
        $vars['secondary']['#prefix'] .= '<ul class="tabs--secondary pagination pagination-sm stabs">';
        $vars['secondary']['#suffix'] = '</ul>';
        $output .= html_entity_decode(drupal_render($vars['secondary']));
    }

    return $output;
}

Hope it helps someone looking for same.