Opening links in a new window

Asfand Yar Qazi ayqazi at gmail.com
Wed Aug 26 14:18:06 EDT 2009


Hi,

Short question:

How do I create links that open in a new browser window/tab without
resorting to raw HTML?

Long question:

So I want to have links like so:

<a href='http://wherever.com' rel='external'>This is a link</a>

I've got some javascript that runs on every page after it is loaded
and translates the rel='external' into target='_blank'.  Stupid XHTML
1.0 strict doesn't allow target='_blank' even though all browsers
support it, so the javascript magic is purely so my html is validated
against it.

I know I can just put raw HTML in, but I don't want to.  There has to
be an easier way, using the lovely RedCloth syntax.  Help?

Thanks


More information about the Redcloth-upwards mailing list