Forum closed. New forum available at

wym stripping out target="_blank"

Support forum for WYMeditor.

wym stripping out target="_blank"

Postby alfrombrum on Wed Oct 10, 2007 8:59 am


Great work on wym. One problem I've found is that if I try to add target="_blank" to a link tag, wym strips it out, even though this is valid XHTML.

Is there a way to stop this happening, or to make a link open in a new window?

Posts: 3
Joined: Thu Jul 12, 2007 1:18 pm

Postby jfh on Mon Oct 15, 2007 10:57 am

Using target attribute is not valid XHTML strict.
Anyway, you can for example use jQuery in your live web pages to add the attribute.
User avatar
Site Admin
Posts: 370
Joined: Sat Sep 23, 2006 8:43 pm
Location: Belgium

try this

Postby Al on Fri Dec 14, 2007 9:11 pm

Sorry for my english,
this my solution :

you need to add/insert :
- line 366 :
Code: Select all
targetSelector:    ".wym_target",

- insert after line 457 : (dialog link)
Code: Select all
+ "<div class='row'>"
+ "<label>Target</label>"
+ "<input type='checkbox' class='wym_target' size='40' /> New window"
+ "</div>"

- insert after line 1325 (into : if(link){...) if the checkbox is checked :
Code: Select all
   link.attr("onclick", ";return false;");
}else {

- insert after line 1294 (into : if(selected){... to check the checkox into the link dialog when the target exist

Code: Select all

Pour que l'attribut target="_blank" passe le W3C, il faut remplacer par un onclick=";return false;"
Posts: 4
Joined: Fri Dec 14, 2007 8:32 pm
Location: Orléans (France)

Re: wym stripping out target="_blank"

Postby Esie on Fri Oct 15, 2010 7:56 am

Hi,.guys...i am new in this site,..can you please sent me,..
some info and detail??
thanks in advance,...

how to deal with depression
Posts: 1
Joined: Fri Oct 15, 2010 7:46 am

Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest