Welcome! » Log In » Create A New Profile

TargetBlank - Not For Relative Links?

Posted by laurin1 
TargetBlank - Not For Relative Links?
January 19, 2015 09:38AM

Why does HTML.TargetBlank not work for relative links? Is there a way to change that?

Re: TargetBlank - Not For Relative Links?
January 19, 2015 01:25PM

As in, links whose href are the form "#foo"? It should work...

Re: TargetBlank - Not For Relative Links?
January 19, 2015 02:09PM

As in, links whose href are the form "#foo"? It should work...

No. I can't show you examples, but when I put HTML in the post, it's converted to an actual link and using the CDATA method indicated in the help does not work.

But I mean using "http://foo.com/foo.htm" works, but a link with just "/foo.htm" does not work.

Re: TargetBlank - Not For Relative Links?
January 19, 2015 02:19PM

Oh, that's because that's what HTML.TargetBlank was designed to do. You can easily patch it or make a similar AttrTransform that unconditionally adds target.

Re: TargetBlank - Not For Relative Links?
January 19, 2015 03:44PM

Why would you only want explicit links to use target="_blank"?

Re: TargetBlank - Not For Relative Links?
January 19, 2015 04:10PM

The idea was that maybe for links on your own website, you can have them on the same page, but you want links to external websites you want to pop up in new windows.

Re: TargetBlank - Not For Relative Links?
June 05, 2015 10:20PM

Thank you for this information

Arabic books

Author:
Your Email:

Subject:

HTML input is enabled. Make sure you escape all HTML and angled brackets with < and >.

Auto-paragraphing is enabled. Double newlines will be converted to paragraphs; for single newlines, use the pre tag.

Allowed tags: a, abbr, acronym, b, blockquote, caption, cite, code, dd, del, dfn, div, dl, dt, em, i, ins, kbd, li, ol, p, pre, s, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, var.

For inputting literal code such as HTML and PHP for display, use CDATA tags to auto-escape your angled brackets, and pre to preserve newlines:

<pre><![CDATA[
Place code here
]]></pre>

Power users, you can hide this notice with:

.htmlpurifier-help {display:none;}

Message: