• Resolved Jory Hogeveen

    (@keraweb)


    Hi,

    I would like to see the esc_url function removed in the widget function on line 91 (image_widget.php).

    $instance['link'] = apply_filters( 'image_widget_image_link', $instance['link'] , $args, $instance );

    This function makes it imposible for me to add shortcodes in the url.

    My shortcode: [url]/page

    If this is possible in an other way, please let me know!

    Thank you

    https://www.ads-software.com/plugins/image-widget/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Peter Chester

    (@peterchester)

    Because the security of the masses is more important than the flexibility for a few, I’m not planning on removing that code. However… I think you could write a function that bypasses it on your site if you want.

    the whole thing is wrapped in a filter ‘image_widget_image_link’. That means that you can write a function to hook that filter that does whatever you want. In fact, you can even do away with the [url] shortcode all together by detecting if the link starts with ‘http’ and if it doesn’t then assume it’s a local link that needs your url in it.

    BTW, this also normally works fine with local links. you can just put in ‘/page’ and it will work on most people’s sites.

    Thread Starter Jory Hogeveen

    (@keraweb)

    Thanks for your reply.

    I understand and no problem. Your solution at the bottom worked (why did I never thought of that -.-) so it’s no problem anymore.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘remove esc_url in widget function ($instance['link'])’ is closed to new replies.