Skip to content

Rewrites links in your HTML fields to set target="_blank" for links pointing to external domains.

Notifications You must be signed in to change notification settings

lhilton/EE-Rewrite-Links

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

**** THIS CODE IS NO LONGER SUPPORTED ****

This method of handling link targets proved to be a bit of a dead-end for me.  I would suggest using better content valdiation on input along with some Javascript (I like jQuery) to handle target setting.  For example, see this:

http://www.leezilla.net/post/12080289777/the-jquery-the-link-and-the-target



***************************************************************

Attempts to rewrite HTML links to set target="_blank" for any link that is outside the configured site_url value.

Example:
----------------
{exp:rewrite_links}
{some_html_field}
{/exp:rewrite_links}

Result:
----------------
<code><a href="http://somexternaldomain.com/</code>somepath">Some linked text</a></code>
Becomes
<code><a href="http://somexternaldomain.com/somepath" target="_blank">Some linked text</a></code>
----------------
CHANGELOG:

1.0
* 1st version

About

Rewrites links in your HTML fields to set target="_blank" for links pointing to external domains.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages