Skip to content
Snippets Groups Projects
Commit 388ed8e7 authored by Lachlan Ennis's avatar Lachlan Ennis
Browse files

Issue #2929567 by elachlan: Add '\''data-extlink'\'' html attribute and update filtering

parent eb96140d
No related branches found
No related tags found
No related merge requests found
......@@ -68,7 +68,7 @@
// available in jQuery 1.0 (Drupal 5 default).
var external_links = [];
var mailto_links = [];
$('a:not(.' + settings.extlink.extClass + ', .' + settings.extlink.mailtoClass + '), area:not(.' + settings.extlink.extClass + ', .' + settings.extlink.mailtoClass + ')', context).each(function (el) {
$('a:not([data-extlink]), area:not([data-extlink])', context).each(function (el) {
try {
var url = '';
if (typeof this.href == 'string') {
......@@ -173,7 +173,8 @@
var links_with_images = $(links).find('img').parents('a');
$links_to_process = $(links).not(links_with_images);
}
$links_to_process.addClass(class_name);
// Add data-extlink attribute.
$links_to_process.attr('data-extlink','');
var i;
var length = $links_to_process.length;
for (i = 0; i < length; i++) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment