Topic on Talk:Snippets/Open specific links in new window

Open a linked image in a new window

3
Jrsovereign (talkcontribs)

When I try to do this with an image:

<span class="newwin">[[File:Summer Banner.jpg|link=Summer Fun]]</span>

It gives me a "Bad title" page with this error: The requested page title contains invalid characters: "[".

and the URL looks like this: https://mywikisite/index.php/[object%20HTMLImageElement]

Any ideas?

Ciencia Al Poder (talkcontribs)

I've updated the code to fix this.

Jrsovereign (talkcontribs)

Thanks! Works great.