• Resolved giuseppe65

    (@anguria65)


    Hi,

    I added a link in the description of a gallery but target=”blank” doesn’t work.
    Is there a way to make the link open in a new browser tab?

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Mihai Ceban

    (@mihaiimagely)

    Hi @anguria65,

    We are sorry but NextGen Gallery strips out the majority of HTML tag attributes ( for the security reasons ) using  M_NextGen_Pro_I18N::get_kses_allowed_html()  method.

    Theoretically, you can substitute the call to?M_NextGen_Pro_I18N::get_kses_allowed_html()?with something that returns your own list of HTML elements and allowed classes but that’d require coding skills.

    • This reply was modified 1 year, 8 months ago by Mihai Ceban.

    Hi, I also need target=”_blank” option.

    I found the nextgen-gallery/products/photocrati_nextgen/modules/i18n/module.i18n.php file and the function get_kses_allowed_html():

    I tried to change the code adding ‘target’ => array() to allowed tags, but it still doesn’t work.

        static public function get_kses_allowed_html()
        {
            global $allowedtags;
    
            $our_keys = array(
                'a'      => array('href'  => array(),
                                  'class' => array(),
                                  'target' => array(),							  
                                  'title' => array()),
                'br'     => array(),
                'em'     => array(),
                'strong' => array(),
                'u'      => array(),
                'p'      => array('class' => array()),
                'div'    => array('class' => array(), 'id' => array()),
                'span'   => array('class' => array(), 'id' => array())
            );
    
            return array_merge_recursive($allowedtags, $our_keys);
        }

    Can you help a little bit?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Gallery description with html and blank target’ is closed to new replies.